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. Container controls

Container controls

Scheduled Pinned Locked Moved C#
dockerhelpquestion
4 Posts 3 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.
  • H Offline
    H Offline
    hasansheik
    wrote on last edited by
    #1

    Dear all, Can any one explain me what is the difference between container control and normal control Since both are derived from a Control class I am not able to differenciate them.please help me to find out the given control is container control or not. Have a nice day.

    A 1 Reply Last reply
    0
    • H hasansheik

      Dear all, Can any one explain me what is the difference between container control and normal control Since both are derived from a Control class I am not able to differenciate them.please help me to find out the given control is container control or not. Have a nice day.

      A Offline
      A Offline
      albCode
      wrote on last edited by
      #2

      Control container is example Panel in which we can set controls such is button,textbox,label,datetimepicker, etc.... Control is single one - example : button Control is single one - example : label Control is single one - example : textbox Control is single one - example : datetimepicker, etc....

      H 1 Reply Last reply
      0
      • A albCode

        Control container is example Panel in which we can set controls such is button,textbox,label,datetimepicker, etc.... Control is single one - example : button Control is single one - example : label Control is single one - example : textbox Control is single one - example : datetimepicker, etc....

        H Offline
        H Offline
        hasansheik
        wrote on last edited by
        #3

        thanks for your reference. How can I identify that the control is container control or not, at runtime. Contact him at: hasansheik@hotmail.com hasansheik@yahoo.co.in hasansheik@lycos.com

        S 1 Reply Last reply
        0
        • H hasansheik

          thanks for your reference. How can I identify that the control is container control or not, at runtime. Contact him at: hasansheik@hotmail.com hasansheik@yahoo.co.in hasansheik@lycos.com

          S Offline
          S Offline
          Sean Michael Murphy
          wrote on last edited by
          #4

          hasansheik wrote:

          How can I identify that the control is container control or not, at runtime.

          Test the control against System.Windows.Forms.ContainerControl using the is operator:

          System.Console.WriteLine(this is System.Windows.Forms.ContainerControl);
          System.Console.WriteLine(label1 is System.Windows.Forms.ContainerControl);

          Where this is the form. The above two lines return true and false, respectively, since Form is derived from ContainerControl, and Label is not. ContainerControl inherits from ScrollableControl, which you can read about here[^]. Share and enjoy. Sean

          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