user3131471
user3131471

Reputation: 63

create a widget in SWT with 2 parents

Is there any way to create a widget in SWT with 2 parents such that same widget appears in both the places? For example:

Button Source = new Button(composite1||composite, SWT.RADIO);

Upvotes: 0

Views: 50

Answers (1)

greg-449
greg-449

Reputation: 111142

SWT controls can only have one parent so you can't do this.

You can change the parent of a control using the Control.setParent(Composite) method, but this may not be supported on some platforms so is probably best avoided.

Upvotes: 3

Related Questions