Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Drag And Drop widgets
Drag And Drop widgets [message #436936] Wed, 26 May 2004 13:11 Go to next message
Eclipse UserFriend
Originally posted by: am560571.wcupa.edu

I have created a custom widget, which contains a Clabel and a sashForm.
In the main program I give the label a Mouse Listener and I want to be
able to drop the widget in a certain way depending on where the mouse is
released. In order to do this I will have to switch one widgets location
with another. All the widgets are located in the main SashForm. The
default layout is vertical so it would be possible to switch 1st and 2nd
widgets, or 1st and 3rd widgets and leave the 2nd widgets where it is.
Re: Drag And Drop widgets [message #436986 is a reply to message #436936] Thu, 27 May 2004 14:22 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
The SashForm lays out its children based on z-order. Use Control.moveAbove
and Control.moveBelow to modify the z-order. After changing the z-order of
the widgets, then a force a layout on the SashForm (SashForm.layout(true)).


"whatsgoingon" <am560571@wcupa.edu> wrote in message
news:c92517$65p$1@eclipse.org...
> I have created a custom widget, which contains a Clabel and a sashForm.
> In the main program I give the label a Mouse Listener and I want to be
> able to drop the widget in a certain way depending on where the mouse is
> released. In order to do this I will have to switch one widgets location
> with another. All the widgets are located in the main SashForm. The
> default layout is vertical so it would be possible to switch 1st and 2nd
> widgets, or 1st and 3rd widgets and leave the 2nd widgets where it is.
>
Re: Drag And Drop widgets [message #437100 is a reply to message #436986] Fri, 28 May 2004 18:55 Go to previous message
Eclipse UserFriend
Originally posted by: am560571.wcupa.edu

THank you I actually did it compleltly different but, now I might give
your idea a try.


Veronika Irvine wrote:

> The SashForm lays out its children based on z-order. Use Control.moveAbove
> and Control.moveBelow to modify the z-order. After changing the z-order of
> the widgets, then a force a layout on the SashForm (SashForm.layout(true)).


> "whatsgoingon" <am560571@wcupa.edu> wrote in message
> news:c92517$65p$1@eclipse.org...
> > I have created a custom widget, which contains a Clabel and a sashForm.
> > In the main program I give the label a Mouse Listener and I want to be
> > able to drop the widget in a certain way depending on where the mouse is
> > released. In order to do this I will have to switch one widgets location
> > with another. All the widgets are located in the main SashForm. The
> > default layout is vertical so it would be possible to switch 1st and 2nd
> > widgets, or 1st and 3rd widgets and leave the 2nd widgets where it is.
> >
Previous Topic:Linux M9 : standalone examples dont' launch
Next Topic:the Windows X
Goto Forum:
  


Current Time: Fri Apr 26 04:33:15 GMT 2024

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

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

Back to the top