ToggleButton and CheckedChange...

Everest

Member
Licensed User
Longtime User
Hello

Seems to be a bug to me because it was not what I expected. You tell me if it is a bug.

Setting the checked property of the togglebutton caused the CheckedChange event to fire. OK that seems normal.

So, I disabled the ToggleButton, set the property and then enabled the ToggleButton. I did not expect the CheckedChange event to fire if the ToggleButton was not enabled.

AudioClickBtn.Enabled = False
AudioClickBtn.Checked = Globals.yesBtnClick
AudioClickBtn.Enabled = True

I worked around it by:

If (AudioClickBtn.Enabled = False) Then
Return
End If

in the CheckedChange event.

While the workaround works, it is a workaround, to me.

Cheers,

Mark
 

jiangws

Member
Licensed User
Longtime User
Good workaround! Thanks
 
Top