Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How do I set initial RCP window size
How do I set initial RCP window size [message #545114] Tue, 06 July 2010 16:37 Go to next message
Jeff Johnston is currently offline Jeff JohnstonFriend
Messages: 175
Registered: July 2009
Senior Member
I have an RCP editor app. In the createInitialLayout() method of my perspective, I am adding the Outline view to the right and putting in a place holder for a Console view on the bottom. I use the ID_EDITOR_AREA for the refid in both cases.

The problem I am seeing has to do with the ratio I must supply as argument to the IPageLayout.addView() and IPageLayout.addPlaceHolder() methods which determine the relative size of the views to the editor area.

These ratios appear to only apply to the initial size of the window which in my case is rather small for the screen. When fully maximized, it is leaving these views at the same width or height they had initially (it stretches them only in one dimension). So, I am left with a thin Outline view to the right and a shallow Console view on the bottom when the window gets maximized.

Unless this is a bug, I either need a larger initial window size so these widths/heights are reasonable for the full-size window or I have to pick a very large ratio such that the initial window is unusable.

How do I set the initial window size?
Re: How do I set initial RCP window size [message #545122 is a reply to message #545114] Tue, 06 July 2010 17:11 Go to previous messageGo to next message
Madhu Samuel is currently offline Madhu SamuelFriend
Messages: 199
Registered: July 2009
Senior Member
On 06-07-2010 22:07, Jeff Johnston wrote:
>
> How do I set the initial window size?

Inside ApplicationWorkbenchWindowAdvisor.preWindowOpen(), you can set
the initial window size (400,300) using configurer.setInitialSize(new
Point(400, 300));

Regards,
Madhu
EclipseBible.com


Re: How do I set initial RCP window size [message #545131 is a reply to message #545122] Tue, 06 July 2010 17:54 Go to previous message
Jeff Johnston is currently offline Jeff JohnstonFriend
Messages: 175
Registered: July 2009
Senior Member
Thanks, that did the trick. I should have thought to look there.
Previous Topic:Using commands inside a form
Next Topic:perspective shortcuts in menus (commands) without "other.."
Goto Forum:
  


Current Time: Fri Nov 28 16:03:48 GMT 2014

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

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