Jump to content

How to check if a check box has changed?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
Peckerfish

Peckerfish

    Newbie

  • Members
  • Pip
  • 8 posts
I'd like this also check if the chkMember check box has actually changed. I've tried a little with chkMember.CheckedChanged but am usure how.

if (chkMember.Checked == true)

{

checker = currUser.ToUpper();

textBoxChecker.SelectedText = checker;

beam1.SetUserProperty("DWC_MODELCHK_UID", checker);

}

Thanks in advance!

#2
Termana

Termana

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,057 posts
you could store the checked state in a boolean and then check against it with the current checked value.
Posted via CodeCall Mobile

#3
ArekBulski

ArekBulski

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,376 posts
I am not sure which one solution interests you. First is you use the CheckedChanged event so you are notified. Second solution is as Termana says. You create a bool variable, then before-change code can check was it changed, and after-change code should set the variable to the new state.