How to add event handler to control created at run time.
-
For example I have RichTextBox control I inherited and added IsDirty Boolean property. Now I wonder how can I programmicly (at run time) add event on key press to set this property to true? I know how to do it through designer.
-
For example I have RichTextBox control I inherited and added IsDirty Boolean property. Now I wonder how can I programmicly (at run time) add event on key press to set this property to true? I know how to do it through designer.
TrooperIronMan wrote:
Now I wonder how can I programmicly (at run time) add event on key press to set this property to true? I know how to do it through designer.
You have to "write code". You know... use the keyboard instead of the mouse. Yeah it's old fashioned but at least they give you a "text wizard" to do it in! :rolleyes:
led mike
-
TrooperIronMan wrote:
Now I wonder how can I programmicly (at run time) add event on key press to set this property to true? I know how to do it through designer.
You have to "write code". You know... use the keyboard instead of the mouse. Yeah it's old fashioned but at least they give you a "text wizard" to do it in! :rolleyes:
led mike
sure why not but exactly what code should look like, that is question?
-
sure why not but exactly what code should look like, that is question?
OK i figured out you don't have to bother... it wasn't as complicated as expected... thanks...