Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » CoolBars on Linux-GTK
CoolBars on Linux-GTK [message #447156] Thu, 09 December 2004 09:29 Go to next message
Eclipse UserFriend
Originally posted by:

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);
ToolItem tItem1_2 = new ToolItem(toolbar1,SWT.PUSH);

CoolItem item1 = new CoolItem(coolbar,SWT.PUSH);
Point pt1 = toolbar1.computeSize(SWT.DEFAULT,SWT.DEFAULT);
pt1 = item1.computeSize(pt1.x,pt1.y);

ToolBar toolbar2 = new ToolBar(coolbar,SWT.FLAT);
ToolItem tItem2_1 = new ToolItem(toolbar2,SWT.PUSH);

CoolItem item2 = new CoolItem(coolbar,SWT.PUSH);
Point pt2 = toolbar2.computeSize(SWT.DEFAULT,SWT.DEFAULT);
pt2 = item2.computeSize(pt2.x,pt2.y);

Re: CoolBars on Linux-GTK [message #447159 is a reply to message #447156] Thu, 09 December 2004 09:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by:

Editing myself:

noticing that the only way to make them show up is using the .pack()
method. This, will make them useless and ugly though. (tried to use
setSize, but it simply ignored that one, and gave them all the same size
anyway, and kept them invisible)

Guess I better get back to Swing, SWT doesn't play nice with me ;)

Best regards
Re: CoolBars on Linux-GTK [message #447203 is a reply to message #447159] Thu, 09 December 2004 12:30 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
There are several SWT examples showing how to use the Coolbar. See: ppets/src/org/eclipse/swt/snippets/ mp;content-type=text/vnd.viewcvs-markup ppets/src/org/eclipse/swt/snippets/ amp;content-type=text/vnd.viewcvs-markup ppets/src/org/eclipse/swt/snippets/ amp;content-type=text/vnd.viewcvs-markup

"Stefan "Elwesth
Previous Topic:Table Cell Selection
Next Topic:browser widget on AIX platform
Goto Forum:

Current Time: Sat Jul 24 14:09:00 GMT 2021

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

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

Back to the top