Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Prevent resizing Views in a Perspective
Prevent resizing Views in a Perspective [message #447139] Wed, 29 March 2006 14:09 Go to next message
Eclipse UserFriend
I am trying to create a top panel with a fixed height.
The following snippet gives the desired effect but it doesn't prevent the user to resize and change the height of the view. Is it possible (as in Swing BorderLayout) to set a fixed height for the top panel and leave the remaining height for the others?
<pre>
layout.addStandaloneView(Navigation.View.ID_VIEW,
false,
IPageLayout.TOP,
0.0f,
IPageLayout.ID_EDITOR_AREA);
IFolderLayout center = layout.createFolder("Center",
IPageLayout.BOTTOM,
1.0f,
IPageLayout.ID_EDITOR_AREA);
</pre>

Thanks
Re: Prevent resizing Views in a Perspective [message #447726 is a reply to message #447139] Thu, 13 April 2006 11:39 Go to previous messageGo to next message
Eclipse UserFriend
I don't think Eclipse supports this at all. I wanted to document the workaround I used to overcome the issue in case someone else needs it:

Instead of using a view at the top position and trying to prevent users resizing it, we went with a CoolBar at the top where we added the visual components using

fillCoolBar(ICoolBarManager coolBar) method in WorkbenchAdvisor implementation.

We still have an issue of setting the coolbar height to an arbitrary value but, overall it served the purpose.
Re: Prevent resizing Views in a Perspective [message #447735 is a reply to message #447726] Thu, 13 April 2006 14:34 Go to previous message
Eclipse UserFriend
Its also possible to override
ApplicationWorkbenchWindowAdvisor.createWindowContents and add other
items to the Shell around the workbench area. There is an example of
this in the RCP book:
http://www.amazon.com/gp/product/0321334612/sr=8-1/qid=11449 53108/ref=pd_bbs_1/102-3050529-6118538?%5Fencoding=UTF8

The only caveat is that there is some lost functionality when you do
this. For example, I believe the fast view area on the status bar
cannot be used when this method is overriden.



Cuneyt Karul wrote:
> I don't think Eclipse supports this at all. I wanted to document the workaround I used to overcome the issue in case someone else needs it:
>
> Instead of using a view at the top position and trying to prevent users resizing it, we went with a CoolBar at the top where we added the visual components using
>
> fillCoolBar(ICoolBarManager coolBar) method in WorkbenchAdvisor implementation.
>
> We still have an issue of setting the coolbar height to an arbitrary value but, overall it served the purpose.
Previous Topic:user based saveState()?
Next Topic:Error handling
Goto Forum:
  


Current Time: Wed Apr 30 13:42:08 EDT 2025

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

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

Back to the top