Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » Working with custom Styles
Working with custom Styles [message #131179] Thu, 21 September 2006 08:38 Go to next message
Eclipse UserFriend
Originally posted by: peter.vermeulen.maniagroup.com

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
Re: Working with custom Styles [message #131237 is a reply to message #131179] Thu, 21 September 2006 14:21 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

VE currently doesn't support adding to subclasses.
Re: Working with custom Styles [message #614642 is a reply to message #131179] Thu, 21 September 2006 14:21 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

VE currently doesn't support adding to subclasses.
Previous Topic:ClassCastException: org.eclipse.ve.internal.java.core.BeanProxyAdapter when tried to create a custom
Next Topic:ClassCastException: org.eclipse.ve.internal.java.core.BeanProxyAdapter when tried to create a custom
Goto Forum:
  


Current Time: Fri Apr 26 20:45:39 GMT 2024

Powered by FUDForum. Page generated in 0.02690 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top