Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make an Eclipse org.eclipse.swt.widgets.Text component wider?

I think the question says it all. I'm new to Eclipse plugin development, so I'm sure there's an easy answer.

like image 958
Bialecki Avatar asked Dec 12 '25 23:12

Bialecki


1 Answers

final Composite area = new Composite(parent, SWT.NULL);
final GridLayout gridLayout = new GridLayout();

mTextWidget = new Text(area, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);

// Define a minimum width
final GridData gridData = new GridData();
gridData.widthHint = DEFAULT_WIDTH;
gridData.heightHint = DEFAULT_HEIGHT;
mTextWidget.setLayoutData(gridData);

This you can use to create a text widget and place it into a area (Composite)

like image 98
Markus Lausberg Avatar answered Dec 16 '25 10:12

Markus Lausberg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!