Controls not visible inside the custom composite

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Controls not visible inside the custom composite

Postby myerramalli » Fri Sep 03, 2004 2:43 pm

I have a custom control which have 2 lables and a Text item
The following is the code
public class SITrial extends Composite {
private Text text;
public SITrial(Composite parent, int style) {
super(parent, style);

final Composite composite = new Composite(this, SWT.NONE);
composite.setBounds(15, 15, 170, 55);

final Label label = new Label(composite, SWT.NONE);
label.setBounds(5, 5, 50, 15);
label.setText("Icon");

final Label label_1 = new Label(composite, SWT.NONE);
label_1.setBounds(60, 5, 80, 15);
label_1.setText("Name");

text = new Text(composite, SWT.BORDER);
text.setText("Text");
text.setBounds(5, 30, 160, 20);

//
}

public void dispose() {
super.dispose();
}

protected void checkSubclass() {
}
}

When I lay this custom composite on the designer in my test app, the controls inside it does not show up.
myerramalli
 
Posts: 16
Joined: Thu Aug 26, 2004 4:32 pm

Re: Controls not visible inside the custom composite

Postby Eric Clayberg » Fri Sep 03, 2004 5:55 pm

myerramalli wrote:When I lay this custom composite on the designer in my test app, the controls inside it does not show up.

I tried your example and it worked perfectly on my end. Is the source of the class visible to Designer? In order to show the controls withina custom composite, Designer needs to be able to see the source for that class so that it can be parsed.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Postby myerramalli » Tue Sep 07, 2004 2:17 pm

The source is available, still I cannot see any of the controls
Here is what I did.
Created a project, created a SWT Composite, layed out the required controls in it.
Added this composite to the Custom Controls tab using Windows | preferences | Designer | SWT

Tried to layout this newly created Custom Compsite in the Test App
Designer does not show/recognize any of the controls in it.

I have no idea where I am going wrong
myerramalli
 
Posts: 16
Joined: Thu Aug 26, 2004 4:32 pm

Postby Eric Clayberg » Tue Sep 07, 2004 6:32 pm

myerramalli wrote:The source is available, still I cannot see any of the controls Here is what I did. Created a project, created a SWT Composite, layed out the required controls in it. Added this composite to the Custom Controls tab using Windows | preferences | Designer | SWT Tried to layout this newly created Custom Compsite in the Test App Designer does not show/recognize any of the controls in it. I have no idea where I am going wrong

At this point, I have no idea either. I tried your example and it worked fine on my end. If you want to ZIP up a complete sample project and send it to us at support@swt-designer.com, we can look at it in context. There might be something about how the project is set up that is affecting the outcome.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Postby myerramalli » Thu Sep 09, 2004 8:45 am

I have sent the project to the specifed email-id. Please post the reply in this thread
myerramalli
 
Posts: 16
Joined: Thu Aug 26, 2004 4:32 pm

Postby Eric Clayberg » Thu Sep 09, 2004 10:35 am

myerramalli wrote:I have sent the project to the specifed email-id. Please post the reply in this thread

I tried your project under both Windows and Linux and it looked fine. Here's a screen shot...

Image

Do you, by chance, have Draft Mode turned on? If so, turn it off and see if that helps.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to SWT Designer

Who is online

Users browsing this forum: No registered users and 1 guest