Results 1 to 12 of 12
Thread: How to hide a control in SWT?
- 10-09-2009, 03:18 PM #1
Member
- Join Date
- Oct 2009
- Posts
- 7
- Rep Power
- 0
- 10-09-2009, 06:42 PM #2
Member
- Join Date
- Oct 2009
- Posts
- 6
- Rep Power
- 0
Hide or destroy?
Just hiding might still use the container(need a place to hide too right?), just plain thinking.
I would suggest destroying it.
You could achieve what I suggest by looping over the the widgets in the container and then locating the one you want to destroy and then doing
controlObject.dispose();
Something like:
CheersJava Code:for(Control controlObject : nameOfContainer.getChildren()){ if(controlObject == nameOfYourControl){ controlObject.dispose(); } }
-singswt
- 10-09-2009, 07:07 PM #3
Member
- Join Date
- Oct 2009
- Posts
- 7
- Rep Power
- 0
Ops, destroy the control is not a good solution, cause the user could desire sometime to it show up, turn it invisble is perfect, but as i said even invisible the control consumes space in the container.
And that's the problem, would be perfect to turn the control invisible and it completely vanish from the user's sign.
- 10-09-2009, 07:48 PM #4
Member
- Join Date
- Oct 2009
- Posts
- 6
- Rep Power
- 0
Why can't you new out the control when the user wants to see it? and fill up the properties of the control again, so basically having the code for the control in one place and using a method call to re populate the control could work.
- 10-09-2009, 08:02 PM #5
Member
- Join Date
- Oct 2009
- Posts
- 7
- Rep Power
- 0
Cause is simpler to just hide the control than destroy and build all the layout again to show it.
- 10-09-2009, 08:53 PM #6
Member
- Join Date
- Oct 2009
- Posts
- 6
- Rep Power
- 0
please do publish about how you succeeded when you succeed.
thanks,
- 11-04-2009, 12:23 PM #7
Member
- Join Date
- Nov 2009
- Posts
- 6
- Rep Power
- 0
Can any body how to open matlab with java swt
- 11-04-2009, 12:26 PM #8
Member
- Join Date
- Nov 2009
- Posts
- 6
- Rep Power
- 0
can any body know how to open matlab with activex controll in java swt?
- 11-04-2009, 12:26 PM #9
Member
- Join Date
- Nov 2009
- Posts
- 6
- Rep Power
- 0
can any body know how to open matlab with activex controll in java swt?
- 11-04-2009, 05:02 PM #10
Member
- Join Date
- Oct 2009
- Posts
- 6
- Rep Power
- 0
what you mean by open matlab ? can you explain?
- 05-12-2010, 04:16 PM #11
Member
- Join Date
- May 2010
- Posts
- 5
- Rep Power
- 0
You may try
.setVisible();
shell.layout();
- 10-18-2010, 09:52 AM #12
Member
- Join Date
- Oct 2010
- Posts
- 2
- Rep Power
- 0
If you're using GridLayout, you can use the exclude property on control's GridData.
Here's a link to an example snippet:
Exclude a widget from a GridLayout : Layout*«*SWT JFace Eclipse*«*Java
Similar Threads
-
How to Hide cursor
By priya in forum Java SoftwareReplies: 1Last Post: 12-09-2010, 09:39 PM -
hide one frame under another
By marodia in forum AWT / SwingReplies: 7Last Post: 08-25-2009, 01:23 PM -
[SOLVED] how to hide jframes
By yonghan in forum AWT / SwingReplies: 6Last Post: 08-10-2009, 04:08 AM -
How to hide Download Link
By tarzan1234 in forum JavaServer Pages (JSP) and JSTLReplies: 8Last Post: 02-05-2009, 02:49 PM -
control app width based on certain control
By thebillybobjr in forum SWT / JFaceReplies: 0Last Post: 05-15-2008, 04:52 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks