Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Reordering widgets within composite
Reordering widgets within composite [message #557909] Thu, 09 September 2010 11:59 Go to next message
msultakov  is currently offline msultakov Friend
Messages: 6
Registered: September 2010
Junior Member
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 11:32 Go to previous messageGo to next message
Lakshmi ShanmugamFriend
Messages: 275
Registered: July 2009
Location: India
Senior Member
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


Lakshmi P Shanmugam
Re: Reordering widgets within composite [message #558518 is a reply to message #558159] Mon, 13 September 2010 11:06 Go to previous message
msultakov  is currently offline msultakov Friend
Messages: 6
Registered: September 2010
Junior Member
Lakshmi, thank you very much!
Previous Topic:TreeViewer/TableViewer with lots columns performance problem
Next Topic:Custom widget problem
Goto Forum:
  


Current Time: Thu Oct 19 11:07:27 GMT 2017

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

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