Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Add Tabbed pane to a ViewPart
Add Tabbed pane to a ViewPart [message #517021] Thu, 25 February 2010 18:36 Go to next message
Eclipse UserFriend
Originally posted by: rob.a.wood.gmail.com

I have a view that extends ViewPart and is implemented as a Form. I
need to restructure it to add more information, and the best way to
organize it visually will be to use tabs. I've investigated using
TabFolder/CTabFolder, but the TabItem can only accept a Control. At
this point the only solution I can see is to provide a very crude
simulation: use buttons as proxies for tabs, and clear / rebuild the
entire form each time a button is clicked -- this is very expensive and
error prone, so I'm looking for any a better approach.

Any sane recommendations for simulating a tabbed pane (like JTabbedPane,
but compatible with Forms) would be greatly appreciated.

- Rob
Re: Add Tabbed pane to a ViewPart [message #517181 is a reply to message #517021] Fri, 26 February 2010 14:19 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Robert Wood wrote:
> I have a view that extends ViewPart and is implemented as a Form. I
> need to restructure it to add more information, and the best way to
> organize it visually will be to use tabs. I've investigated using
> TabFolder/CTabFolder, but the TabItem can only accept a Control.

Why would only accepting a control be a problem? AFAIK you would place
a Composite in each CTabItem. You can then break up your Form, one per
Composite as you need to break up information.

Check out org.eclipse.ui.part.MultiPageEditorPart (as a code example)
which uses a CTabFolder and is used to implement editors like the PDE
MANIFEST.MF editor.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: Add Tabbed pane to a ViewPart [message #517731 is a reply to message #517181] Mon, 01 March 2010 20:46 Go to previous message
Eclipse UserFriend
Originally posted by: rob.a.wood.gmail.com

Paul Webster wrote:
> Robert Wood wrote:
>> I have a view that extends ViewPart and is implemented as a Form. I
>> need to restructure it to add more information, and the best way to
>> organize it visually will be to use tabs. I've investigated using
>> TabFolder/CTabFolder, but the TabItem can only accept a Control.
>
> Why would only accepting a control be a problem? AFAIK you would place
> a Composite in each CTabItem. You can then break up your Form, one per
> Composite as you need to break up information.
>
> Check out org.eclipse.ui.part.MultiPageEditorPart (as a code example)
> which uses a CTabFolder and is used to implement editors like the PDE
> MANIFEST.MF editor.
>
> PW
>

Thanks for the suggestion. I studied MultiPageEditorPart, and, after a
little trial and error, got it working.
Previous Topic:Eclipse 3.5.1 destroys editor titles...
Next Topic:cannot run application on mac os x
Goto Forum:
  


Current Time: Thu Apr 25 20:11:27 GMT 2024

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

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

Back to the top