code_junkie

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

Nov 12th, 2011
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. final Composite area = new Composite(parent, SWT.NULL);
  2. final GridLayout gridLayout = new GridLayout();
  3.  
  4. mTextWidget = new Text(area, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
  5.  
  6. // Define a minimum width
  7. final GridData gridData = new GridData();
  8. gridData.widthHint = DEFAULT_WIDTH;
  9. gridData.heightHint = DEFAULT_HEIGHT;
  10. mTextWidget.setLayoutData(gridData);
Add Comment
Please, Sign In to add comment