Click here to Skip to main content
14,390,428 members
Rate this:
Please Sign up or sign in to vote.
See more:
Button _chkbtn= new Button(container,SWT.CHECK);
 gridData = new GridData(SWT.FILL, SWT.CENTER, true, false, 1,1);   
 _chkbtn.setText("STATUS");
 _chkbtn.setLayoutData(gridData);
Posted
Updated 9-Jan-12 20:45pm
v3

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

The Checkbox get's checked/unchecked when you click it.

To set the state of that checkbox, you need to set it selected:

Button.setSelection(true);
   
Comments
vicky patole 10-Jan-12 5:23am
   
thanks you are my teacher..great

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100