[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.platform.swt] Re: Floating toolbars
|
I think you want RowLayout(SWT.VERTICAL).
I have not used CoolBar yet, just looked into it, so take what I say with
a grain of salt...
I don't think that you are being descriptive enough about what you want.
You say you want to drag it around like IE, but where exactly do you
expect to be able to drag it? Even in IE you can only drag sub-bars (or
CoolItems) around within the normal toolbar (or CoolBar) area. It almost
sounds like you want to drag it to the bottom of the window, or doc it
along the side. If you can do that in your IE, then you have a very
different version than I have (which could be possible, since I don't
bother to keep it upgraded to the current level of security hole... :-) ).
It looks like you only have a single CoolItem. If you only have a single
sub-bar, then even in IE you can't drag it around anywhere. You need at
least two CoolItems in order to drag anything anywhere.
You state that you have one ToolBar embeded in a CoolBar. I'm asuming you
mean you have one ToolBar embeded in a CoolItem, embeded in a CoolBar,
since the CoolBar documentation states "The item children that may be
added to instances of this class must be of type CoolItem."
Again, try using two CoolItems, otherwise there is nowhere to drag
anything.
James Willans wrote:
> I'll try to be more explicit with what I'm trying to achieve. The
> following screenshot represents what I have so far:
> http://www-users.cs.york.ac.uk/~jwillans/screenshot.jpg
> I consider a floating toolbar to be one that can be dragged around its
> parent and reposition (such as those in Internet Explorer). The CoolBar
> shown in this screenshot does not have this functionality, I'm interested
> to know how this is achieved.
> As far as layout is concerned. From the screenshot you will see a
> TabFolder with three components: the CoolBar, a SashForm and a Scale.
> These are positioned using FillLayout. What I want to achieve is a more
> conventional layout of this kind of application, with the Coolbar at the
> top, the SashForm dominating the centre and the Scale at the bottom. I'm
> interested to know which layout manager would enable me to do this, in
> this case examples would also be useful of similar scenarios.
> Thanks in anticipation of any help,
> James
> Veronika Irvine wrote:
> > To me floating means that the toolbar is a separate shell that sits in
front
> > of your application. What do you mean by floating? How would you like the
> > toolbar to be positioned?
> > FormLayout will allow you to attach the toolbar anywhere you want and
either
> > stretch it or leave it at its default size.
> > "James Willans" <jwillans@xxxxxxxxxxxxx> wrote in message
> > news:ba08od$b8o$1@xxxxxxxxxxxxxxxx
> > > Robert,
> > >
> > > Thanks for that. Although that was useful, it has not solved my problem.
> > > I want to place a floating toolbar in a TabFolder. I can get to the
stage
> > > where I am able to display a toolbar (embedded in a coolbar), however:
> > >
> > > 1) I can't get it to float.
> > > 2) I can't get the layout manager so that it displays it with the
> > > appropriate dimensions. I've tried every layout manager but it always
> > > displays the size of the toolbar in proportion to the other components
> > > within the TabFolder. Is the ToolBarManager class useful here?
> > >
> > > Thanks,
> > >
> > > James
> > >
> > > Robert Bacs wrote:
> > >
> > > > Hi,
> > >
> > > > See 14.05 Re: ToolBar/CoolBar (Steve Northover).
> > >
> > > > > Sorry if this is an obvious question. How does one create floating
> > > > > toolbars in SWT? I've looked at ToolBar and I've looked at CoolBar,
> > but I
> > > > > can't seem to use this functionality to get what I want. Any code
> > > > > examples would be much appreciated.
> > >
> > > > > Thanks,
> > >
> > > > > James
> > >
> > >
> > >
> > >
> > >
> > >
> > >