Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to hide and Show views????
How to hide and Show views???? [message #449371] Thu, 11 May 2006 10:54 Go to next message
Eclipse UserFriend
Originally posted by: juavizga.hotmail.com

I have a Persective with several views, and the TABS disposition is the following:

----------------------------
|VIEW1 |VIEW2 |VIEW3 |VIEW4 |
| |
|VIEW5 |VIEW6 |
|---------------------------|

I want that by default views from 5 & 6 are hidden and when I click on view 1, then view 5 appears, and that when I click on view 2, view 5 gets hidden and view 6 appears.

I tried with:

IWorkbenchPage wbp=PlatformUI.getWorkbench().getActiveWorkbenchWindow().get ActivePage();
wbp.hideView(wbp.findView(MyView6.ID));

and
IWorkbenchPage wbp=PlatformUI.getWorkbench().getActiveWorkbenchWindow().get ActivePage();
wbp.showView(MyView5.ID);

But nothing. Does anybody know how can I do it?

Thanks.
Re: How to hide and Show views???? [message #449402 is a reply to message #449371] Fri, 12 May 2006 00:09 Go to previous messageGo to next message
Eclipse UserFriend
hi

where you have tried this code. in the createPArtControl of the view1 or you are using some selection listener
Re: How to hide and Show views???? [message #449407 is a reply to message #449402] Fri, 12 May 2006 03:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: juavizga.hotmail.com

I've tried in the createPArtControl. From one view I tried to hide/show another.
Re: How to hide and Show views???? [message #449408 is a reply to message #449407] Fri, 12 May 2006 03:51 Go to previous messageGo to next message
Eclipse UserFriend
ok. your code to hide and show view is right but actully createpartcontrol() is called when the view is shown first time.

so it might possible that In your situation view5 is creatating after view1 so it means when the createpartControl of the view1 is called, view5 is not created yet.

so you have to place the code somewhere else.
you can try this code through some action. or you can use partListener to your workbench page.

cheers!
Re: How to hide and Show views???? [message #449410 is a reply to message #449408] Fri, 12 May 2006 04:42 Go to previous message
Eclipse UserFriend
Originally posted by: juavizga.hotmail.com

Thank you :)
Previous Topic:actions in Context Menu
Next Topic:RCP with webservice using internal Tomcat plugin
Goto Forum:
  


Current Time: Sun Aug 31 09:55:08 EDT 2025

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

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

Back to the top