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. Controls

Controls

Scheduled Pinned Locked Moved C#
questionvisual-studio
3 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.
  • R Offline
    R Offline
    RomanD
    wrote on last edited by
    #1

    I have a control that expands when pressed. My question is how do I manange/move the other controls so nothing overlaps. Also, how can I add a checkbox to a label before Text label. When I add it to label.Controls I just see the checkbox. And last thing, in my class, I have label.autosize = false; but when I add that control to the form, the VS 2005 sets the autosize property to true. Thanks

    A H 2 Replies Last reply
    0
    • R RomanD

      I have a control that expands when pressed. My question is how do I manange/move the other controls so nothing overlaps. Also, how can I add a checkbox to a label before Text label. When I add it to label.Controls I just see the checkbox. And last thing, in my class, I have label.autosize = false; but when I add that control to the form, the VS 2005 sets the autosize property to true. Thanks

      A Offline
      A Offline
      Alex Korchemniy
      wrote on last edited by
      #2

      There is no built in support for laying out controls. What you can do is derive from ContainerControl and catch the resize event for all the contained controls. When resize occurs you determine if you need to perform layout. If you do need to perform layout u can do something like this (psuedo-code): int currentx; int currenty; foreach(control c in this.controls) { c.location = new point(currentx, currenty); increment currentx and current y } >> how can i add a checkbox to a label Whats the point of doing that?

      1 Reply Last reply
      0
      • R RomanD

        I have a control that expands when pressed. My question is how do I manange/move the other controls so nothing overlaps. Also, how can I add a checkbox to a label before Text label. When I add it to label.Controls I just see the checkbox. And last thing, in my class, I have label.autosize = false; but when I add that control to the form, the VS 2005 sets the autosize property to true. Thanks

        H Offline
        H Offline
        Heath Stewart
        wrote on last edited by
        #3

        Layout support is added in .NET 2.0 scheduled for release next year. You can download the .NET Framework 2.0 Beta 1 now from http://msdn.microsoft.com/netframework/downloads/updates/default.aspx[^]. You can also download Visual Studio 2005 Express Beta 1 from http://labs.msdn.microsoft.com/vs2005/[^]. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles]

        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