How to enable/disable a view's dock ability in runtime? [message #264962] |
Mon, 02 August 2004 00:03  |
Eclipse User |
|
|
|
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 18:19  |
Eclipse User |
|
|
|
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.
>
|
|
|
Powered by
FUDForum. Page generated in 0.03877 seconds