N
Nigel V Thomas
Hi (sorry a bit long winded)
I do not know if I'm barking up the wrong tree here but...
Summary:
I have UserControl which has a textbox on it. I use a class (to which the
text box is bound) to perform some non-standard validation and raise events
and logs errors. Works fine.
Now I need to extend the UserControl to display a CheckBox or a TextBox. I
can't bind the CheckBox to the validation class because it's expecting a
TextBox.
I've changed the declaration in the Class from:
Dim objValidation as TextBox
....to
Dim objValidation as Object
Now, naturally, objValidation does not expose the events of TextBox (which
it did when it was created as a textBox.
So the question is this:
Is it possible to create an object using the declaration Dim obj as Object
which inherits (is that the right term) either the TextBox or CheckBox events?
Nigel
I do not know if I'm barking up the wrong tree here but...
Summary:
I have UserControl which has a textbox on it. I use a class (to which the
text box is bound) to perform some non-standard validation and raise events
and logs errors. Works fine.
Now I need to extend the UserControl to display a CheckBox or a TextBox. I
can't bind the CheckBox to the validation class because it's expecting a
TextBox.
I've changed the declaration in the Class from:
Dim objValidation as TextBox
....to
Dim objValidation as Object
Now, naturally, objValidation does not expose the events of TextBox (which
it did when it was created as a textBox.
So the question is this:
Is it possible to create an object using the declaration Dim obj as Object
which inherits (is that the right term) either the TextBox or CheckBox events?
Nigel