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. Reordering DOCKED controls

Reordering DOCKED controls

Scheduled Pinned Locked Moved C#
tutorialquestion
6 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
    Radgar
    wrote on last edited by
    #1

    Hi all, the app. allows the user to create/add multiple textboxes (let's say) via a button click. Each textbox is docked at the bottom of the last added one. How do I change the order or in other words, move the one at the end to the 2nd place for example.. thanks in advance.. Radgar "Imagination is more important than knowledge." - Albert Einstein

    A J 2 Replies Last reply
    0
    • R Radgar

      Hi all, the app. allows the user to create/add multiple textboxes (let's say) via a button click. Each textbox is docked at the bottom of the last added one. How do I change the order or in other words, move the one at the end to the 2nd place for example.. thanks in advance.. Radgar "Imagination is more important than knowledge." - Albert Einstein

      A Offline
      A Offline
      Alomgir Miah
      wrote on last edited by
      #2

      I think you should use DockManager to achieve this. http://www.codeproject.com/cs/miscctrl/DockManager.asp Live Life King Size Alomgir Miah

      1 Reply Last reply
      0
      • R Radgar

        Hi all, the app. allows the user to create/add multiple textboxes (let's say) via a button click. Each textbox is docked at the bottom of the last added one. How do I change the order or in other words, move the one at the end to the 2nd place for example.. thanks in advance.. Radgar "Imagination is more important than knowledge." - Albert Einstein

        J Offline
        J Offline
        Judah Gabriel Himango
        wrote on last edited by
        #3

        You can do this by changing the Z order of the controls. BringToFront() and SendToBack() modify the Z order.

        Tech, life, family, faith: Give me a visit. I'm currently blogging about: Homosexuality in Christianity Judah Himango

        R 1 Reply Last reply
        0
        • J Judah Gabriel Himango

          You can do this by changing the Z order of the controls. BringToFront() and SendToBack() modify the Z order.

          Tech, life, family, faith: Give me a visit. I'm currently blogging about: Homosexuality in Christianity Judah Himango

          R Offline
          R Offline
          Radgar
          wrote on last edited by
          #4

          thank you Judah. I tried that before I posted but the user may add 100 controls and when you modify the z-order, the action get slower and slower.. Thank you anyway. Radgar "Imagination is more important than knowledge." - Albert Einstein

          J 1 Reply Last reply
          0
          • R Radgar

            thank you Judah. I tried that before I posted but the user may add 100 controls and when you modify the z-order, the action get slower and slower.. Thank you anyway. Radgar "Imagination is more important than knowledge." - Albert Einstein

            J Offline
            J Offline
            Judah Gabriel Himango
            wrote on last edited by
            #5

            That's probably a bad idea adding hundreds of controls. Each control contains an expensive HWND, could you fake the adding of controls? You could send a WM_Paint event to make the control draw to a surface, drawing it multiple times...

            Tech, life, family, faith: Give me a visit. I'm currently blogging about: Homosexuality in Christianity Judah Himango

            R 1 Reply Last reply
            0
            • J Judah Gabriel Himango

              That's probably a bad idea adding hundreds of controls. Each control contains an expensive HWND, could you fake the adding of controls? You could send a WM_Paint event to make the control draw to a surface, drawing it multiple times...

              Tech, life, family, faith: Give me a visit. I'm currently blogging about: Homosexuality in Christianity Judah Himango

              R Offline
              R Offline
              Radgar
              wrote on last edited by
              #6

              it's a complicated usercontrol Judah. That's why I cannot do what you suggested. thanx anyway. Radgar "Imagination is more important than knowledge." - Albert Einstein

              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