Working with custom Styles [message #614638] |
Thu, 21 September 2006 08:38 |
Peter Vermeulen Messages: 11 Registered: July 2009 |
Junior Member |
|
|
I want to do the following:
I have created a new Style component that is a subclass of the SWT
Composite.
Call it a MyComposite.
MyComposite contains a toolbar on the top part, and another composite that
takes all space below the toolbar. This is the contentpane for MyComposite.
So far, everything works fine in VE. It shows up in the Styles-list when I
create a new Visual Class. I can select it and the MyComposite shows up in
VE with the toolbar on top.
Problems start when I try to add sub-components to MyComposite.
For this I created a subclass of an SWT Button.
Call it a MyButton.
I modified the constructor of MyButton so that it accepts a MyComposite as
first parameter (the parent), and the constructor will make the MyButton a
child of the contentpane of MyComposite, instead of MyComposite itself.
When I make a sample dialog with a MyComposite, containing one MyButton,
(write the code by hand, outside of VE), everything works fine.
But when I try to add a MyButton to a MyComposite by dragging it in VE,
this does not work. VE shows the 'not allowed' cursor-icon when dragging
the MyButton over the MyComposite.
How to tell VE that it is perfectly ok to add a MyButton to a MyComposite?
thanks for your help,
Peter,
Belgium
|
|
|
Powered by
FUDForum. Page generated in 0.03493 seconds