XWT - creating object inside a composite of a component [message #990620] |
Thu, 13 December 2012 13:33  |
Eclipse User |
|
|
|
Hi..
When I use the SWT Designer I can add a component to a composite that is inside a class, the SWT Designer create my component above a method, for example getComposite().
Can I do this in XWT Designer? Or it just create the component inside the other component?
To be more clear, I have a component that has a composite inside, I add this component in the toolkit and it's working. I want to create a button(using the XWT Designer) inside this component, but I want that this button stay inside the composite of the component.
Anyone can help me?
|
|
|
|
Re: XWT - creating object inside a composite of a component [message #990842 is a reply to message #990748] |
Fri, 14 December 2012 12:03   |
Eclipse User |
|
|
|
Hi Eric,
so this is my problem, I can't do using XWT by hand or in Designer...
Before use XWT I'm using SWT Designer, and it's working... by hand or using WB...
There is the image of the tree, in Designer:

There is the java code: (FWHorizontalBox is mine component, see that the parent is getComposite(), that I want to do in XWT)
public test(Display display) {
super(display, SWT.SHELL_TRIM);
setLayout(new FillLayout(SWT.HORIZONTAL));
FWHorizontalBox horizontalBox = new FWHorizontalBox(getComposite(),SWT.NONE);
createContents();
}
|
|
|
|
Powered by
FUDForum. Page generated in 0.03682 seconds