Eclipse Plugin Development: Wrapping Text In a Label

Today I was having trouble wrapping text in a label on an SWT shell in an eclipse plugin.

I found a useful guide that explains what was going wrong. It can be found here.

Wrapping Text Guide

The problem was I hadn’t defined a widthHint for the grid data object. This is apparently used by the label component to work out whether it needs to wrap or not.

  1. Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *