Hello,
I can ́t read and write the state for items. States properties is not under TcxCustomCheckGroupProperties.
I have tried this code without success:
bool b = MyBoolean;
TcxCustomCheckGroup * pcb = new TcxCustomCheckGroup(this);
pcb->Properties->Assign((TcxCustomCheckGroupProperties *)p->cxBarEditItemConfirmar->Properties);
pcb->States[0] = b ? cbsChecked : cbsUnchecked;
How can I change states ?
Regards
TcxBarEditItem with TcxCustomCheckGroupProperties
Answers
Hello Carlos,
Thank you for the question. However, I should say that you cannot change states through the TcxCustomCheckGroupProperties class because this object is only used to create an editor and adjust its values. It doesn't store values. To obtain a value, you should use the corresponding BarEditItem's EditValueProperty. After that, you can calculate check states based upon an item's value using the CalculateCheckStates (cxCheckBox.Pas) method. A sample code can be found in the following article: How to determine which Items are checked in the CheckComboBox
Please feel free to contact us if you need any additional assistance in this regard. We will be happy to help you.
Thanks,
Stan.