[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Composite within a tabFolder won't go invisible

Martin Thompson wrote:
Why can I not make a Composite within my tabFolder go invisible? I do not wish the information on this particular tab to be visible until I programmatically determine that it should be visible. However, the setVisible(false) does not work for the Composite. Why?

final Composite PressureTubeComposite = new Composite(tabFolder, SWT.NONE);

pressureTubeDetailsTabItem.setControl(PressureTubeComposite);

PressureTubeComposite.setEnabled(false);//this works

PressureTubeComposite.setVisible(false);//this does not work

TabFolder calls setVisible on the control to make it visible when the tab is made visible. To avoid showing the control, don't call TabItem.setControl() until you're ready.


Matthew