Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Hide an SWT composite
Hide an SWT composite [message #634976] Mon, 25 October 2010 10:11 Go to next message
No real name is currently offline No real nameFriend
Messages: 4
Registered: October 2010
Junior Member
Hello

I'm creating an Eclipse view. One of it's composites should appear/disappear according to a certain event.
When the view is created the composite is hidden.
I've managed to display it once the appropriate event occurs.

My problem is that I don't understand how to hide the composite once it's displayed.

//create
errorLabel = new Label(composite, SWT.NONE);
//hide label
errorGridData.exclude = true;

//upon event - show
errorGridData.exclude = false;
composite.getParent().layout(true);

//after event - hide
errorGridData.exclude = true;
composite.getShell().layout(true);


Any idea on how this can be done?
Regards
Re: Hide an SWT composite [message #634981 is a reply to message #634976] Mon, 25 October 2010 10:23 Go to previous messageGo to next message
Devi Vara Prasad Bandaru is currently offline Devi Vara Prasad BandaruFriend
Messages: 100
Registered: March 2010
Location: Hyderabad
Senior Member

You need to set the visibility to false for the composite to get it hidden..
There is a small example which i have already posted in the below discussion. See if it helps you..
http://www.eclipse.org/forums/index.php?t=msg&th=198756& amp;start=0&S=42061e345874d1056e78fdf110ef3f6e



Re: Hide an SWT composite [message #635019 is a reply to message #634981] Mon, 25 October 2010 12:42 Go to previous message
No real name is currently offline No real nameFriend
Messages: 4
Registered: October 2010
Junior Member
Thank you, that did the trick

//after event - hide
[B]errorComposite.setVisible(false);[/B]
errorGridData.exclude = true;
composite.getShell().layout(true);
Previous Topic:Text vertical scrollbar not usable on Mac
Next Topic:SWT Browser doesn't use system's default.
Goto Forum:
  


Current Time: Fri Dec 13 00:09:23 GMT 2019

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

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

Back to the top