Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to change row layout structure based on radio button in Eclipse SWT(How to change row layout structure based on radio button in Eclipse SWT)
How to change row layout structure based on radio button in Eclipse SWT [message #833648] Sat, 31 March 2012 16:51 Go to next message
Eclipse UserFriend
I want to show two text boxes based on selection of a radio button using SWT Widget. However, when I will select another radio button, the previous textboxes should be hidden and a dropdown should be displayed. I am able to achieve the functionality using setVisibility(true) and false. The main problem here is that when the textboxes are not displayed, the space for them is getting consumed and the dropdown is coming below that based on selection of 2nd radio button . I don't want to waste that much space and want the layouts to overlap and consume a common space allotted to them since both can't be used at the same time.
Re: How to change row layout structure based on radio button in Eclipse SWT [message #834122 is a reply to message #833648] Sun, 01 April 2012 08:46 Go to previous messageGo to next message
Eclipse UserFriend
Place the text-input and the combobox on parent Composite using FillLayout.
Re: How to change row layout structure based on radio button in Eclipse SWT [message #836488 is a reply to message #833648] Wed, 04 April 2012 10:39 Go to previous message
Eclipse UserFriend
Here are a couple of example snippets to look at:

-
http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet98.java
-
http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet249.java

Grant


On 3/31/2012 4:51 PM, Subhadeep Bose wrote:
> I want to show two text boxes based on selection of a radio button using
> SWT Widget. However, when I will select another radio button, the
> previous textboxes should be hidden and a dropdown should be displayed.
> I am able to achieve the functionality using setVisibility(true) and
> false. The main problem here is that when the textboxes are not
> displayed, the space for them is getting consumed and the dropdown is
> coming below that based on selection of 2nd radio button . I don't want
> to waste that much space and want the layouts to overlap and consume a
> common space allotted to them since both can't be used at the same time.
Previous Topic:select collapsed item in TreeView
Next Topic:How to select all files of a particular type in the included jar using Eclipse SWT
Goto Forum:
  


Current Time: Wed Jul 23 01:52:25 EDT 2025

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

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

Back to the top