Checkbox listener snippet? [message #1064569] |
Thu, 20 June 2013 00:48 |
Jesse Weinstein Messages: 44 Registered: July 2012 |
Member |
|
|
I'm trying to toggle the visibility of a Control based on whether or not a checkbox is checked. This seems like something that should be obvious, but I can't find any snippet or example that shows the preferred way to achieve this. Once I find out, I'd like to submit one.
My investigation found that a SWT.Selection listener is fired when the box is checked or unchecked, I can use getSelection() to tell if it is checked, and if the button is final, it can be accessed in the listener, so that works, but I'm not at all sure if this the preferred way to do it. Thoughts?
[Updated on: Thu, 20 June 2013 00:52] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03933 seconds