Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Vertical toolbar... Is it possible?
Vertical toolbar... Is it possible? [message #444700] Wed, 20 October 2004 18:31 Go to next message
Andrea is currently offline AndreaFriend
Messages: 27
Registered: July 2009
Junior Member
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 18:48 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
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
Previous Topic:SWT and MAC OS X
Next Topic:Icon and title in Eclipse Help System
Goto Forum:
  


Current Time: Thu Oct 22 22:01:49 GMT 2020

Powered by FUDForum. Page generated in 0.01969 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top