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. Runtime Class Declaration

Runtime Class Declaration

Scheduled Pinned Locked Moved C#
comtutorial
3 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.
  • M Offline
    M Offline
    mfcuser
    wrote on last edited by
    #1

    The title may not be right, but I don't know how to call it. I want to know how to make a class adapt to a particular of control at run time. I am building a rich textbox control similar to the one below. http://www.codeproject.com/cs/miscctrl/richtextboxextended.asp Everything works fine, but I don't want the control to adapt to the richtextbox at the time I am building it. I want the users to choose specific textbox when they drag the component to the form. In that case, when they drag the control to the form, only the toolbar portion will show, not the text area. From the toolbar property, they can choose the richtextbox to associate the component with. I want this type of functionality, in that case the richtextobx can be located anywhere in the form. It does not have to be located right below the toolbar.

    M 1 Reply Last reply
    0
    • M mfcuser

      The title may not be right, but I don't know how to call it. I want to know how to make a class adapt to a particular of control at run time. I am building a rich textbox control similar to the one below. http://www.codeproject.com/cs/miscctrl/richtextboxextended.asp Everything works fine, but I don't want the control to adapt to the richtextbox at the time I am building it. I want the users to choose specific textbox when they drag the component to the form. In that case, when they drag the control to the form, only the toolbar portion will show, not the text area. From the toolbar property, they can choose the richtextbox to associate the component with. I want this type of functionality, in that case the richtextobx can be located anywhere in the form. It does not have to be located right below the toolbar.

      M Offline
      M Offline
      mfcuser
      wrote on last edited by
      #2

      I added a public value something like that set { RichTextBox = value; } From the control, I set the richtextbox visibility to false. I built it; it seemed to work fine. Now, when I dragged the control to the form, then dropped a richtextbox to test it. I can see a combo in the property where I can select that richtextbox name. However when I selected it, the program exited abruptly which seemed to be an exception to me.

      P 1 Reply Last reply
      0
      • M mfcuser

        I added a public value something like that set { RichTextBox = value; } From the control, I set the richtextbox visibility to false. I built it; it seemed to work fine. Now, when I dragged the control to the form, then dropped a richtextbox to test it. I can see a combo in the property where I can select that richtextbox name. However when I selected it, the program exited abruptly which seemed to be an exception to me.

        P Offline
        P Offline
        PhilDanger
        wrote on last edited by
        #3

        I think you can debug the designer by opening up a second instance of VS and attaching the debugger to the instance you want to debug through Debug > Attach to Process, this should let you know more about the exception.

        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