G
ge0193387
I'm dynamically adding controls to a custom control based on the data
type of the property being used.
So if the property is a string the control will be a groupbox
containing a textbox for entry of the string and a checkbox that I
would like to check on the textchanged event.
If the property is an enum I want the same items but instead of a
textbox I want a combobox to be filled with the enum values and the
event handler tied to the selected index changed.
To sum up I'm trying to find some property or attribute on a control
that will tell me what the default event is then create a handler for
that event at runtime.
type of the property being used.
So if the property is a string the control will be a groupbox
containing a textbox for entry of the string and a checkbox that I
would like to check on the textchanged event.
If the property is an enum I want the same items but instead of a
textbox I want a combobox to be filled with the enum values and the
event handler tied to the selected index changed.
To sum up I'm trying to find some property or attribute on a control
that will tell me what the default event is then create a handler for
that event at runtime.