Vertical toolbar... Is it possible? [message #444700] |
Wed, 20 October 2004 14:31  |
Eclipse User |
|
|
|
Hi, Is possible to implement a vertical toolbar? IŽm using the
SWT.VERTICAL style but it doesnŽt work. I tried to set the size,but
nothing happened...
Best regards,
Andréa
|
|
|
Re: Vertical toolbar... Is it possible? [message #444701 is a reply to message #444700] |
Wed, 20 October 2004 14:48  |
Eclipse User |
|
|
|
The following works for me:
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new GridLayout());
ToolBar bar1 = new ToolBar(shell, SWT.HORIZONTAL);
for (int i = 0; i < 3; i++) {
ToolItem item = new ToolItem(bar1, SWT.PUSH);
item.setText("item "+i);
}
ToolBar bar2 = new ToolBar(shell, SWT.VERTICAL);
for (int i = 0; i < 3; i++) {
ToolItem item = new ToolItem(bar2, SWT.PUSH);
item.setText("item "+i);
}
shell.pack();
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
"Andrea" <andrea@inatel.br> wrote in message
news:cl6aut$46g$1@eclipse.org...
> Hi, Is possible to implement a vertical toolbar? I
|
|
|
Powered by
FUDForum. Page generated in 0.04271 seconds