[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: How to group checkbox?
|
You will need to write the code that enforces radio behavior yourself. Note
that this may confuse your users who won't expect radio behavior from check
buttons.
"HeroShaman" <dattringo@xxxxxxxxx> wrote in message
news:07227090db5c5e392c922d7a80d5c3b1$1@xxxxxxxxxxxxxxxxxx
> I don't know how to group checkbox with only one is check (like Radio
> button)
>
> group1 = new Group(parent, SWT.NONE);
> GridLayout group1Layout = new GridLayout();
> group1Layout.makeColumnsEqualWidth = true;
> group1.setLayout(group1Layout);
> FormData group1LData = new FormData();
> group1LData.width = 293;
> group1LData.height = 66;
> group1LData.left = new FormAttachment(0, 1000, 60);
> group1LData.top = new FormAttachment(0, 1000, 23);
> group1.setLayoutData(group1LData);
>
> button1 = new Button(group1, SWT.CHECK | SWT.LEFT);
> button1.setText("button1");
>
> button2 = new Button(group1, SWT.CHECK | SWT.LEFT);
> button2.setText("button2");
>
>
> Please help.
>