I wish to use the Validating event on a label in VB.Net (Visual Studio 2005, .Net Runtime 2.0).
I have two text boxes side by side. These are for a %/% split allocation, such as 80/20, 50/50, etc. So, I have validation on each box to ensure that their values are >= 0 and <= 100. It is my desire to have the label off to the left of the textboxes have its own validation, which will ensure that the two text box values total exactly 100.
I know I can do this in the individual text box Validating event. I just do not want that behavior. I would rather have a discrete message on each text box, stating that its contents are outside the valid domain of values, and have an error message by the label if their total is not 100.
The problem is that, despite setting CausesValidation = True on the Label controls, their Validating events do not fire. Even manually calling Me.ValidateChildren() at the form level will not fire the event for labels.
Any ideas?