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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Expose childcontrols

Expose childcontrols

Scheduled Pinned Locked Moved ASP.NET
csharpvisual-studioquestion
7 Posts 2 Posters 1 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.
  • A Offline
    A Offline
    ake_krakbar
    wrote on last edited by
    #1

    Hello folks! Is there any way of exposing all child controls in a composite control in the Visual Studio Designer? If my composite control consists of a label and a textbox, I would provide the ability for the page user to select either one of these child controls and set its properties. I have looked through the net 2 Designer classes but found nothing useful.... best regards /Jonas

    I 1 Reply Last reply
    0
    • A ake_krakbar

      Hello folks! Is there any way of exposing all child controls in a composite control in the Visual Studio Designer? If my composite control consists of a label and a textbox, I would provide the ability for the page user to select either one of these child controls and set its properties. I have looked through the net 2 Designer classes but found nothing useful.... best regards /Jonas

      I Offline
      I Offline
      Ista
      wrote on last edited by
      #2

      public Label MyLabel { get{ return lbl; } } 1 line of code equals many bugs. So don't write any!!

      A 1 Reply Last reply
      0
      • I Ista

        public Label MyLabel { get{ return lbl; } } 1 line of code equals many bugs. So don't write any!!

        A Offline
        A Offline
        ake_krakbar
        wrote on last edited by
        #3

        Hello Ista! Thanks for your reply. This exposes the hyperlink so that all its properties are accessible from the Property Browser. I would like to make it selectable in the Visual studio designer, even though its nested within the composite control. regards /Jonas

        I 1 Reply Last reply
        0
        • A ake_krakbar

          Hello Ista! Thanks for your reply. This exposes the hyperlink so that all its properties are accessible from the Property Browser. I would like to make it selectable in the Visual studio designer, even though its nested within the composite control. regards /Jonas

          I Offline
          I Offline
          Ista
          wrote on last edited by
          #4

          [Browseable(true)] public Label MyLabel { get{ return lbl; } } 1 line of code equals many bugs. So don't write any!!

          A 1 Reply Last reply
          0
          • I Ista

            [Browseable(true)] public Label MyLabel { get{ return lbl; } } 1 line of code equals many bugs. So don't write any!!

            A Offline
            A Offline
            ake_krakbar
            wrote on last edited by
            #5

            Hello Istra! I would like to make the child control selectable in the Visual studio designer, even though its nested within the composite control. Setting the browsable attribute doesn´t do that...

            I 2 Replies Last reply
            0
            • A ake_krakbar

              Hello Istra! I would like to make the child control selectable in the Visual studio designer, even though its nested within the composite control. Setting the browsable attribute doesn´t do that...

              I Offline
              I Offline
              Ista
              wrote on last edited by
              #6

              Actually that attribute makes that property visible not the control 1 line of code equals many bugs. So don't write any!!

              1 Reply Last reply
              0
              • A ake_krakbar

                Hello Istra! I would like to make the child control selectable in the Visual studio designer, even though its nested within the composite control. Setting the browsable attribute doesn´t do that...

                I Offline
                I Offline
                Ista
                wrote on last edited by
                #7

                You could make the control public and you might be able to get at it But, thats a bad design idea. Then they could delete the control and other things and you would have errors all over the place. 1 line of code equals many bugs. So don't write any!!

                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