Select / Unselect user control

911 views Asked by At

I am creating an application in which i have a user control that can be added by user dynamically any number of times. Form also contains some other controls.

Suppose he has added the control 10 times.

Requirement:

1) When the control is selected, it should be highlighted and when the other control is selected then the previous control looses the glow.

2) User can select multiple controls at the same time. Now all the selected controls should be highlighted and the selection has to be made with ctrl key.

There is also a possibility of moving the controls on the form.

What I have achieved:

1) I am able to add multiple controls dynamically.

2) I can change the location of one control dynamically.

3) I am able to highlight the control when it is clicked, but not able to un-glow it when user has clicked elsewhere. Need to know which event of User control can be used for that. -- Got the solution for this. On mouse click i made the focus on the control and then handle GotFocus and Lost Focus events to golw and un-glow the control.

Problem Left:

No success in selecting multiple controls and dragging them simultaneously. If i would be able to select multiple controls then dragging would not be very difficult.

1

There are 1 answers

3
vysakh On

If you are talking about buttons, unfortunately you cant select multiple at a time..