[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.platform.swt] Re: Replace a component in a sashForm?
|
If the SWT Gurus don't answer anything better, you could create 2 composites
to hold your original content. One for each side of the Sashform.
1. Create 2 composites (compositeA and compositeB) and place in your
Sashform, set their layouts the FillLayout
2. Create the composites you are using now in your Sashform as children of
the composites you created in step #1. Ex. Composite myContent = new
Composite ( compositeA, SWT.WHATEVER ) ; would put your composite in the
left/top of the sashform sash.
3. When you want to change the contents of one of the sides of the Sashform,
simply dispose of the myContent child composite you created in step 2 and
create a new composite with the parent being the compositeA you created in
step 1.
It's very cheesy but should work.
Thanks
Dave
"Mathieu Fougeray" <mathieu.fougeray@xxxxxxxxxxxx> wrote in message
news:b7otri$ua2$1@xxxxxxxxxxxxxxxx
> Hi all,
>
>
> I have a SashForm with Composite objects in it, and I would like to change
> one of these composite with another new Composite object, but I only can
add
> at the end of the sashform whereas I would like to replace an existing
> component!
>
> Indeed : Composite newComposite = new Composite(sashForm, SWT.NONE);
> puts this new composite at the end of the sashForm ;(
>
> Does anybody have an idea how acn I specify the place where to put a new
> component in a sashForm?
>
> Thanks for help!
>
> Mathieu.
>
>