Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to add event handler to control created at run time.

How to add event handler to control created at run time.

Scheduled Pinned Locked Moved C#
tutorialquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TrooperIronMan
    wrote on last edited by
    #1

    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.

    L 1 Reply Last reply
    0
    • T TrooperIronMan

      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.

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      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

      T 1 Reply Last reply
      0
      • L 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

        T Offline
        T Offline
        TrooperIronMan
        wrote on last edited by
        #3

        sure why not but exactly what code should look like, that is question?

        T 1 Reply Last reply
        0
        • T TrooperIronMan

          sure why not but exactly what code should look like, that is question?

          T Offline
          T Offline
          TrooperIronMan
          wrote on last edited by
          #4

          OK i figured out you don't have to bother... it wasn't as complicated as expected... thanks...

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups