if a cxBarEditItem1 is a checkbox, how to get it&#

2019-07-22 14:14发布

问题:

On my dxBarManager1Bar1 a cxBarEditItem1 is a checkbox. How can I check it's state (if it's checked or not checked) ?

回答1:

For accomplishing your task, you can use the EditValue property.

if (cxBarEditItem1.EditValue <> Null) AND (cxBarEditItem1.EditValue = True) then 
  ShowMessage('Checked!')
else 
  ShowMessage('Not Checked! (or null)');

Note that EditValue is a Variant property which can also have Null value.