I have several checkboxes that I assign an initial value to them using code. But when I execute:
it will execute the cbxDisplayLabel_CheckedChange event. I don't want this event to trigger.
I thought I could disable cbxDisplayLabel but it has no effect, the event still triggers.
I don't know why a disabled view will still trigger an event?
The only other alternative I could come up with is to assign a Tag=1 to each checkbox when I want to ignore the event and in the event check for the sender's tag and if =1 then ignore the event. But this seems hokey.
Is there a better solution?
TIA
B4X:
cbXDisplayLabel.Checked = False
it will execute the cbxDisplayLabel_CheckedChange event. I don't want this event to trigger.
I thought I could disable cbxDisplayLabel but it has no effect, the event still triggers.
B4X:
cbXDisplayLabel.Enabled = False
cbXDisplayLabel.Checked = False 'cbxDisplayLabel_CheckedChange Event still triggers
I don't know why a disabled view will still trigger an event?
The only other alternative I could come up with is to assign a Tag=1 to each checkbox when I want to ignore the event and in the event check for the sender's tag and if =1 then ignore the event. But this seems hokey.
B4X:
cbXDisplayLabel.Tag = 1
cbXDisplayLabel.Checked = False
cbXDisplayLabel.Tag = 0
Is there a better solution?
TIA