Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Can I remove a control from a Composite?
Can I remove a control from a Composite? [message #467422] Tue, 31 January 2006 08:20 Go to next message
nielinjie is currently offline nielinjieFriend
Messages: 13
Registered: July 2009
Junior Member
Can I remove a control from a Composite?
I just want to refill a compoiste at runtime, which means I have to remove
all children from a composite and add some other controls to it. But I do
not find remove method for Composite. Anyone can help?
Thanks a lot.
Jason
Re: Can I remove a control from a Composite? [message #467426 is a reply to message #467422] Tue, 31 January 2006 08:30 Go to previous messageGo to next message
lolo is currently offline loloFriend
Messages: 8
Registered: July 2009
Junior Member
You only need to dispose each children of the composite.

Widget[] childrens = composite.getChidrens()
for (int i = 0; i < childrens.length; i++)
children[i].dispose();

Nie, Jason wrote:

> Can I remove a control from a Composite?
> I just want to refill a compoiste at runtime, which means I have to remove
> all children from a composite and add some other controls to it. But I do
> not find remove method for Composite. Anyone can help?
> Thanks a lot.
> Jason
Re: Can I remove a control from a Composite? [message #467429 is a reply to message #467426] Tue, 31 January 2006 09:38 Go to previous message
Eclipse UserFriend
Originally posted by: didier.bolf.wanadoo.fr

yes
and if you wanted to hide a control, you could use exclude on its
layout data and setVisible on the control

didier


"Manuel Nogales" <mnogales@servinform.es> wrote in message news:drn73t$8uh$2@utils.eclipse.org...
> You only need to dispose each children of the composite.
>
> Widget[] childrens = composite.getChidrens()
> for (int i = 0; i < childrens.length; i++)
> children[i].dispose();
>
> Nie, Jason wrote:
>
> > Can I remove a control from a Composite?
> > I just want to refill a compoiste at runtime, which means I have to remove
> > all children from a composite and add some other controls to it. But I do
> > not find remove method for Composite. Anyone can help?
> > Thanks a lot.
> > Jason
>
Previous Topic:KTable Combo renderer
Next Topic:additional widgets
Goto Forum:
  


Current Time: Tue Oct 15 04:46:56 GMT 2019

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

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

Back to the top