Hiding controls [message #466913] |
Thu, 19 January 2006 01:32  |
Eclipse User |
|
|
|
Hi guys,
I'm looking to completely hide a control. The setVisible stops the control
from displaying (a good start) but it still reserves the space in my
GridLayout for the control. Is there anyway I can stop this from happening
(I want to set the height of the control to 0 pixels).
Also is there anyway to clear the contents of a Composite control? I have a
class that extends Composite, but I want to be able to clear the contents of
it.
Thanks in advance,
Joe
|
|
|
|
|
Re: Hiding controls [message #466954 is a reply to message #466938] |
Thu, 19 January 2006 16:42  |
Eclipse User |
|
|
|
Thanks both of you for the response :)
"Jeremy Dowdall" <jeremyd@aspencloud.org> wrote in message
news:dqo955$fvm$1@utils.eclipse.org...
> being SWT controls, those children should be removed by calling
> "dispose" - child.dispose - to free up the system resources
>
> hortiz wrote:
>> To hide a control, you can set the exclude attribute of the associated
>> GridData to true (you still have to set the visibility of the control to
>> false) :
>>
>> controlGridData.exclude = true;
>> control.setVisible(false);
>>
>>
>> To remove all the contents of a composite, you can try to iterate over
>> composite.getChildren() and set each of it to null.
>>
>>
>> Helene
>>
>> Joseph Rignanese wrote:
>>
>>> Hi guys,
>>
>>
>>> I'm looking to completely hide a control. The setVisible stops the
>>> control from displaying (a good start) but it still reserves the space
>>> in my GridLayout for the control. Is there anyway I can stop this from
>>> happening (I want to set the height of the control to 0 pixels).
>>
>>
>>> Also is there anyway to clear the contents of a Composite control? I
>>> have a class that extends Composite, but I want to be able to clear the
>>> contents of it.
>>
>>
>>> Thanks in advance,
>>
>>
>>> Joe
>>
|
|
|
Powered by
FUDForum. Page generated in 0.78758 seconds