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. Selecting more than one controls in winforms

Selecting more than one controls in winforms

Scheduled Pinned Locked Moved C#
csharpwinformscomtoolshelp
2 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.
  • S Offline
    S Offline
    sreejith ss nair
    wrote on last edited by
    #1

    I have a winform with a panel control. Panel control contain few custom label controls, which can easily move anywhere inside that panel control. Now i can only move or select one custom label and place anywhere inside the panel. But here i would like to implement group selection or group movement of custom labels. Please give me some clues which will help me to implement this group selection or movement. Sreejith Nair [ My Articles ]

    M 1 Reply Last reply
    0
    • S sreejith ss nair

      I have a winform with a panel control. Panel control contain few custom label controls, which can easily move anywhere inside that panel control. Now i can only move or select one custom label and place anywhere inside the panel. But here i would like to implement group selection or group movement of custom labels. Please give me some clues which will help me to implement this group selection or movement. Sreejith Nair [ My Articles ]

      M Offline
      M Offline
      Marc Clifton
      wrote on last edited by
      #2

      sreejith ss nair wrote: Please give me some clues which will help me to implement this group selection or movement. Uh, you're not talking about doing this in the designer, right? So, trap the Click event for all the controls and see if the CTRL key is being held down. If it is, add the control to an array of "selected controls". On the MouseMove event for any control, if the CTRL key is still held down, then change the Location of each control in the array based on the mouse movement change. Marc MyXaml Advanced Unit Testing YAPO

      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