Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to enable/disable a view's dock ability in runtime?
How to enable/disable a view's dock ability in runtime? [message #264962] Mon, 02 August 2004 04:03 Go to next message
Eclipse UserFriend
Originally posted by: whohow.vip.sina.com

Is there any one who know how to enable/disable a view's dockablity in
runtime.

i'd like to add a toggle button to a view, when it is toggled, the view is
flat on the top of the workbench. and when the button is not togged, the
view is embedded docked into the workbench. I don't like the default
behavour of the RCP: view can be drag out as a modeless dialog, and if we
drap it, it may be docked int workbench automaticlly.
Re: How to enable/disable a view's dock ability in runtime? [message #265129 is a reply to message #264962] Mon, 02 August 2004 22:19 Go to previous message
Eclipse UserFriend
Originally posted by: andykim78.hotmail.com

Klaus,

Standalone views with title disabled is your best solution at the moment.

in public void createInitialLayout(IPageLayout layout) of your Perspective
class
instead of adding the view through layout.addView do it through
layout.addStandaloneView

There is an additional boolean parameter called showTitle. Set this to false
and users won't be able to drag nor close the view. Be careful though that
other views can still be dropped onto it.

Hope this is what you were looking for!

- Andy Kim

"klaus" <whohow@vip.sina.com> wrote in message
news:cekee7$ute$1@eclipse.org...
> Is there any one who know how to enable/disable a view's dockablity in
> runtime.
>
> i'd like to add a toggle button to a view, when it is toggled, the view is
> flat on the top of the workbench. and when the button is not togged, the
> view is embedded docked into the workbench. I don't like the default
> behavour of the RCP: view can be drag out as a modeless dialog, and if we
> drap it, it may be docked int workbench automaticlly.
>
Previous Topic:"new" file menu item and button in an RCP application
Next Topic:Adding a new view
Goto Forum:
  


Current Time: Thu Nov 27 04:49:43 GMT 2014

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

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