Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » ViewPart.createPartControl( )
ViewPart.createPartControl( ) [message #332250] Tue, 14 October 2008 13:57 Go to next message
Manuel Selva is currently offline Manuel SelvaFriend
Messages: 189
Registered: July 2009
Location: Grenoble, France
Senior Member
Hi all,

Is there any way to get my View's "Size" inside the createPartControl()
method ?

In fact I want to access this information because the view display
information at a different granularity level depending on the available
space ...

After deep step inside Eclipse's internal code it seems to be impossible :

// the part should never be visible by default. It will be made visible
// by activation. This allows us to have views appear in tabs without
// becoming active by default.
control.setVisible(false);

My view is filled through the createPartControl( ) method and is made
visible after leaving this method only if the view has been asked for
activation.

Can anybody confirm ?

Thanks in advance

Manu


Re: ViewPart.createPartControl( ) [message #332251 is a reply to message #332250] Tue, 14 October 2008 14:07 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

You would have to add a resize listener to your view, then you can
update your controls when its size changes ... no? that would work for
the case where the initial size is 0,0 (when creatPartControl(*) is
called but the client area has not been layed out yet).

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/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Previous Topic:Can't use Update manager in 3.3.2
Next Topic:Update Wizard
Goto Forum:
  


Current Time: Thu Sep 26 21:41:49 GMT 2024

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

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

Back to the top