How to add a FormPage into a ViewPart

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

How to add a FormPage into a ViewPart

Postby chungonn » Sun Jan 30, 2005 8:00 am

Hi All,

I have created a FormPage subclass using the FormPage wizard, i would appreciate if someone can tell me how I can add this newly created FormPage subclass into a ViewPart subclass's within its Design page.

Thanks in advance.
chungonn
 
Posts: 2
Joined: Sun Jan 30, 2005 7:54 am

Re: How to add a FormPage into a ViewPart

Postby Eric Clayberg » Sun Jan 30, 2005 10:11 am

chungonn wrote:I have created a FormPage subclass using the FormPage wizard, i would appreciate if someone can tell me how I can add this newly created FormPage subclass into a ViewPart subclass's within its Design page.

A FormPage is a type if EditorPart. I don't know of any way to embed one in a ViewPart.

If you want to use the forms API with a ViewPart, a better approach would be to just add a FormsToolkit to your view part. Any component with a FormsToolkit will show the Forms API tool palette.

Just add the following line as the first line of your ViewPart's createPartControl() method...

    FormToolkit toolkit = new FormToolkit(Display.getCurrent());
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 chungonn » Mon Jan 31, 2005 7:20 am

HI Eric,

Thanks for the tip.
chungonn
 
Posts: 2
Joined: Sun Jan 30, 2005 7:54 am

Postby Eric Clayberg » Mon Jan 31, 2005 10:24 am

chungonn wrote:Thanks for the tip.

BTW, the latest v3.0.1 build includes a wizard for creating Forms API ViewParts.
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