CoolBars on Linux-GTK [message #447156] |
Thu, 09 December 2004 04:29  |
Eclipse User |
|
|
|
Originally posted by: elwis.linuxmail.org
Hello all!
I have a question regading the use of CoolBars (they really are Cool :) on
my Linux-GTK box? it doesn't seem to be very easy to get them to showup? I
did some copy-paste from web-examples, and nope, they aren't there?
(They do however show up on my winmachine?)
Here's simple example, I shout for the createCoolBar() from my
constructor. All that's shown is my fileMenu. I tried commenting that one
out (in case they conflicted) but that didn't help. I also tried to turn
off "Maximize" but nopes.. Out of ideas for now.
private void createCoolBar() {
CoolBar coolbar = new CoolBar(sshell,SWT.NULL);
ToolBar toolbar1 = new ToolBar(coolbar,SWT.FLAT);
ToolItem tItem1_1 = new ToolItem(toolbar1,SWT.PUSH);
tItem1_1.setText("Item1");
ToolItem tItem1_2 = new ToolItem(toolbar1,SWT.PUSH);
tItem1_2.setText("Item2");
CoolItem item1 = new CoolItem(coolbar,SWT.PUSH);
item1.setControl(toolbar1);
Point pt1 = toolbar1.computeSize(SWT.DEFAULT,SWT.DEFAULT);
pt1 = item1.computeSize(pt1.x,pt1.y);
item1.setSize(pt1);
ToolBar toolbar2 = new ToolBar(coolbar,SWT.FLAT);
ToolItem tItem2_1 = new ToolItem(toolbar2,SWT.PUSH);
tItem2_1.setText("Item3");
CoolItem item2 = new CoolItem(coolbar,SWT.PUSH);
item2.setControl(toolbar2);
Point pt2 = toolbar2.computeSize(SWT.DEFAULT,SWT.DEFAULT);
pt2 = item2.computeSize(pt2.x,pt2.y);
item2.setSize(pt2);
}
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02760 seconds