|Re: Reordering children. [message #978171 is a reply to message #976570]
||Fri, 09 November 2012 22:15
| Grant Gayed
Registered: July 2009
I think Control.moveAbove()/moveBelow() is what you want, example
.. The snippet creates a new control and then changes its Z-ordering,
but of course this can also be done with existing controls as well.
If this does not help your case then please follow up.
On 11/8/2012 12:30 PM, Mauro Condarelli wrote:
> Hi, in an RCP application I would like to have a stack of
> ExpandableComposite (Forms Section is what I'm aiming to, but other
> equvalents are ok) that fulfills a couple of additional requirements:
> 1) It should be easy to programmatically add and remove items.
> This shouldn't be a problem even with Sections.
> 2) It should be possible to reorder the items.
> Since the list can grow a lot I would like to offer "MRU on top"
> This is where I'm currently stuck.
> Completely destroying and re-adding a Composite isn't an option because
> composites can hold valuable information I'm not in position to safely
> save at reordering time (i.e.: I can do it, of course, but it would be a
> major PITA, so I keep it as "last resort").
> What is the recommended way to achieve this?
Powered by FUDForum
. Page generated in 0.02119 seconds