[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Adding widgets to a composite after creation.

Hi Mark,

your approach is perfectly fine - you can add or remove (by disposing them) children to a composite at any time - exactly as you did.

The possible reason, why it did not seem to work for you is that you didn't call

storedParent.layout();

without this, the children are there, but no one takes care to position/draw them.

Michal

At the moment I have tried what I thought was the most obvious path, which is to store off the parent passed to 'createPartControl' then just use it from the actions like you would normally do during creation (new Label(storedParent, SWT...). But obviously that does not work or I wouldn't have to ask?