LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Select multiple controls with the mouse in CVI programming

Hello,


I have generated a lot of controls in the panel. Now want to select some specified controls using the mouse, and hope using it drag a reactangle to cover what selecting controls. Please advise if can realize the behaver?


David
0 Kudos
Message 1 of 7
(3,791 Views)

I am assuming you mean that you want to do this in the UIR editor. If so, here is how you do it:

Hold down the shift key on the keyboard. Click the mouse button and drag a selection box around the controls you want.

Or you can hold the shift key and click on each control you want selected. To remove a control from the selection group, hold down the shift key and click the control again.

Martin Fredrickson
Test Engineer

Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128
0 Kudos
Message 2 of 7
(3,785 Views)
Yes. But I just want to use the mouse, not with the key to make a selection box, do you have any idea?


David
0 Kudos
Message 3 of 7
(3,779 Views)
Maybe I'm missing something...
On my machine I actually can draw a selection box with the mouse only: no need to use shift key for the first selection box. Using shift+drag-and-drop permits me to create a second selection box adding surrounded controls to the ones already selected.
What's exactly your problem, David?


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 7
(3,773 Views)

No Roberto, you are right, I was actually thinking about another application where the shift key must be held down.

However, that only applies to the initial selection of an area, after that if you want to add or remove controls to/from that initial selection box, you must use the shift key.

Martin Fredrickson
Test Engineer

Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128
0 Kudos
Message 5 of 7
(3,763 Views)

Hi Roberto,

 

How to draw a rectangle with the mouse in the panel to simulate the cvi panel edit mode?

 

 

David

0 Kudos
Message 6 of 7
(3,007 Views)

You would have to put a canvas control spanning the entire area of the panel, overlapped by all the other controls. Then, you'd have to catch the mouse click events and mouse move events and draw lines in the canvas connecting the current mouse position with the previous mouse position. Or something like that.

 

Luis

 

0 Kudos
Message 7 of 7
(2,980 Views)