|
-
July 8th, 2009, 01:05 PM
#1
Eclipse Plugin Development Checkboxes and Grid Layout
I am really new to Plugin Development and kinda got tossed in the deep end.
I would appreciate any help.
I have a couple problems.
1. I am trying to add a checkbox group (2 checkboxes in the group) to an existing wizard screen. It is setup like this:
Composite composite = new Composite(parent, SWT.NULL);
composite.setFont(parent.getFont());
composite.setLayout(new GridLayout(3, false));
composite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
There is a Text box in the 1st and 3rd column with 2 bottoms in between. i want my checkbox group to appear below all of this. How do I get this to work? Nothing I have tried seems to make a difference, the checkboxes always end up on the very right-hand side.
2. How do I toggle the functionality of the checkboxes? When one is clicked i want the other to be false or unchecked. I have a listener that implements SelectionListener, but it doesn't seem to have access to the other box that wasn't selected so that I could set it to false. Will I need 2 listeners with each one setting the other's selection state (setSelection(false))?
Thanks for any help, I am so stuck here!
-
July 8th, 2009, 06:28 PM
#2
Re: Eclipse Plugin Development Checkboxes and Grid Layout
I don't know Eclipse plug-in development, but if you want a checkbox where only one item is selected at a time, you should be using a radio-button group.
Any programming problem can be solved by adding a level of indirection...
Anon.
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
-
July 9th, 2009, 08:37 AM
#3
Re: Eclipse Plugin Development Checkboxes and Grid Layout
Thanks for responding to my message. The radio buttons are making life so much easier! Like I said, I am totally new to all of this, I didn't even realize that the radio buttons would automatically toggle their state.
Thanks so much!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|