[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: Making a multi-line text control display multiple lines

Use a GridLayout and set the GridData for the text widget with appropriate style / attributes; e.g:
GridData.GRAB_VERTICAL
GridData.heightHint
If you really want to be prespcriptive you could probably combine Text.getLineCount() with new GC( text ).getFontMetrics().getHeight().


Mike E.

David Beers wrote:

I've got some multi-line text widgets (created using the FormToolkit) that I
want to display with a height of more than one line--particularly when there
is more than one line of text in the widget already.  Is there a way to
force them to display with a height = the number of lines of text in the
widget?  Or to an arbitrary height?

David



-- Mike Evans Incremental Ltd. www.incremental.eu.com