Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Reordering widgets within composite
Reordering widgets within composite [message #557909] Thu, 09 September 2010 07:59 Go to next message
Eclipse UserFriend
Hello to everyone! I've got significant experience in Swing-based applications development, and was very surprised when I failed to do such a simple thing as dynamic changing the order of widgets within a composite in SWT.
To be more precise, I've got a composite with GridLayout. Some other widgets can be added, removed or moved up or down inside this composite by a user (i.e. when application is already running). I learned that removing is done via .dispose() method (which looked a bit strange after Swing, but it's OK), but Internet surfing didn't get me any suitable answer about reordering. As far as I understand, I can dispose and recreate components in a desired order each time, but it seems a bit ugly and is very likely to have UI performance impact.
Could you, please, tell me how I can get desired behaviour?
Thanks in advance!
Re: Reordering widgets within composite [message #558159 is a reply to message #557909] Fri, 10 September 2010 07:32 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

You can redorder the controls (i.e, change the drawing order) using the methods Control.moveAbove and Control.moveBelow. Please see this snippet for an example --> Snippet
Re: Reordering widgets within composite [message #558518 is a reply to message #558159] Mon, 13 September 2010 07:06 Go to previous message
Eclipse UserFriend
Lakshmi, thank you very much!
Previous Topic:ScrollBar.setIncrement() no effect on Linux?
Next Topic:Basic Radio button text color question
Goto Forum:
  


Current Time: Sun Jul 27 05:02:45 EDT 2025

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

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

Back to the top