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