Font size of combo items on ScrolledForm [message #115785] |
Mon, 15 December 2008 16:56 |
|
Hi all,
Here's the snippet :
public class ComboDemoEntryPoint implements IEntryPoint
{
@Override
public int createUI()
{
Display display = new Display();
Shell shell = new Shell(display,SWT.SHELL_TRIM);
shell.setLayout(GridLayoutFactory.swtDefaults().create());
FormToolkit toolkit = new FormToolkit(display);
ScrolledForm container = toolkit.createScrolledForm(shell);
container.setLayoutData(GridDataFactory.fillDefaults().grab( true,
true).create());
container.getBody().setLayout(GridLayoutFactory.fillDefaults ().create());
ComboViewer comboViewer = new
ComboViewer(container.getBody(),SWT.READ_ONLY);
comboViewer.getCombo().setLayoutData(GridDataFactory.fillDef aults().grab(true,
false).create());
comboViewer.add(new String[]{"Item 1","Item 2"});
shell.setSize(300,200);
shell.open();
while (!shell.isDisposed())
{
if (!display.readAndDispatch())
display.sleep();
}
return 0;
}
}
Does the font of the combo items look too big ?
Regards,
Setya
|
|
|
|
Powered by
FUDForum. Page generated in 0.02907 seconds