Disable Widgets in Composite

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Disable Widgets in Composite

Postby Runar Jordahl » Sat Dec 09, 2006 12:46 am

I guess this question is not directly related to WindowsBuildPro, but more to SWT:

I have a button held in a composite. I then try to run the following code:

private void afterGuiOpen(Composite composite) {

My intention was that when disabling the composite, its’ components would also be disabled. I can see that this is not happening. What would be the normal method to disabling a composite’s components? Should I access the composite’s subcomponents and disable them “manuallyâ€
Runar Jordahl
Posts: 2
Joined: Sat Dec 09, 2006 12:31 am

Re: Disable Widgets in Composite

Postby Eric Clayberg » Sun Dec 10, 2006 9:18 am

Disabling a Composite does disable its children...it just doesn't gray them out. For that, you probably need to traverse the Comoposite's children and disable each individually.

Setting a Composite invisible should also hide its children.

The best place to ask questions like this is on the Eclipse SWT newsgroup.
Eric Clayberg
Software Engineering Manager

Author: "Eclipse Plug-ins"
Eric Clayberg
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Return to SWT Designer

Who is online

Users browsing this forum: No registered users and 1 guest