0

I'm trying to make a multiline button, but the text gets cut off.

Button button = new Button( containerButton, SWT.PUSH );
button.setText( "Hello\nWorld" );

Is it possible to adjust the height of a button? The only thing I found was setSize( width, height ) but that's not working.

Thanks! Toby

1 Answers1

0

Try to give the button a layout data e.g. a GridData. Here you can set e.g. the heightHint. This should work.

Maybe a good article to read would be: http://www.eclipse.org/articles/article.php?file=Article-Understanding-Layouts/index.html

Holger
  • 437
  • 2
  • 4