Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Elegant Ribbon Tech Support » Checkbox in QAT Collapse All
Subject Author Date
Mark Matthews Jan 14, 2008 - 3:33 PM

Another QAT question: When I add a checkbox control to the QAT it will call the command OK, but I want to use the state of the checkbox to set a class level variable:

myBool = CheckboxTest.Checked;

This works fine when I check/uncheck the checkbox on the form, but when I check/uncheck the QAT checkbox, we get out of sync - that is the command appears to execute before checkbox on the form changes state. Any ideas?

Thanks

Technical Support Jan 15, 2008 - 10:00 AM

We will look into the problem and let you what is wrong as soon as possible. Meanwhile you can try another approach, which we believe is more preferable when using commands. Just subscribe to the Command.DataChanged event of the command associated with CheckboxTest if you want to be informed of data changing independently of any control. You can use the command’s Data property and cast it to a CheckState enum so you can determine if the user checked or cleared the check box.

Mark Matthews Jan 16, 2008 - 12:53 PM

Thanks, that’ll work.