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 #614638] Thu, 21 September 2006 08:38
Peter Vermeulen is currently offline Peter VermeulenFriend
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
Previous Topic:speed of ve, some bugs and wanted features
Next Topic:VE failed to parse public final static Dimention() const of base class
Goto Forum:
  


Current Time: Thu Sep 19 12:50:47 GMT 2024

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

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

Back to the top