Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Controlling the grouping of radio buttons


All I can suggest is that you specify SWT.NO_RADIO_GROUP style when creating the composite and implement the radio behavior yourself using selection listeners on each button.  At one time way back around SWT 2.1, we had code that made consecutive radio buttons act like radio groups (ie. put a separator between button2 and buttonA and this would make 2 groups) but this broke Eclipse and we had to take the code out.  Sorry.



Mark Wallace <mark.e.wallace@xxxxxxxxx>
Sent by: platform-swt-dev-bounces@xxxxxxxxxxx

02/16/2006 07:12 AM

Please respond to
"Eclipse Platform SWT component developers list."

To
"platform-swt-dev@xxxxxxxxxxx" <platform-swt-dev@xxxxxxxxxxx>
cc
Subject
[platform-swt-dev] Controlling the grouping of radio buttons





Hi,
 
is it possible to control the grouping of radio buttons which sahred the same composite
For example if I have:
 
  Button button1 = new Button(shell, SWT.RADIO);
 button1.setText("Radio 1");
 Button button2 = new Button(shell, SWT.RADIO);
 button2.setText("Radio 2");
 Button buttonA = new Button(shell, SWT.RADIO);
 buttonA.setText("Radio A");
 Button buttonB = new Button(shell, SWT.RADIO);
 buttonB.setText("Radio B");

By default these are all in the same group so only one can be selected.
What I want to be able to do is group Radio 1 & Radio 2 and have a seperate group for Radio A & Radio B.
I know I can do this be creating additional Composites but I want to do this and have all buttons share the same parent.
 
thanks Mark_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top