I have a bunch of labels on my form that when a user clicks on one of them I need the backcolor of that label to change to yellow. And then if they double-click on it then it changes back to the standard white color. Is there a function that I can call from the "On Click" and "On Dbl Click" events instead of typing an IF statement for each label? I would prefer to just have a function to run these two pieces of code so I can call the code with line of code instead of an IF statement for each label. I know I've seen something like this before.
The second part of this might not be doable...With each of these labels I have 2 checkboxes (not associated with this label). When the user clicks on the label I want it to change the backcolor as outlined above, but then I need to have these 2 checkboxes to be visible (they aren't visible as the default setting). Then if they double-click on the label then these two checkboxes will be unchecked (if they were checked) and then have them disappear and no longer be visible. When they are not visible they should never be checked. They can only be checked if the user clicks on the label to make them appear. Then the user can check them if needed. But then if they double-click on the label both checkboxes are unchecked and then disappear. Like I said, not sure if this part is doable.
Just trying to simplify this code and not have a bunch of IF statements for each labels click & double-click events.