LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Select buttons (more than one) in run time by mouse click

I don't guess we have Ctrl+Select option available for LV FP Buttons, If you have pre defined user list/category you can group the set/clear button based on the user category.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 11 of 15
(193 Views)

I'd try a radio button with the Zero.or More Selections option and an Execute boolean (Latch when released) to fire the event.

 

The radio button can even use the same ctl typedef shown in your cluster and be predefined to have 16 selections.


"Should be" isn't "Is" -Jay
0 Kudos
Message 12 of 15
(188 Views)

If they really want to select similar to e.g. windows explorer*, a little more code is needed. It can be done.

 

*"ctrl-click" to add or remove an item, "shift-click" to select everything between the last selected and the currently clicked, etc.

0 Kudos
Message 13 of 15
(169 Views)

I am still a beginner but I will try

I appreciate your help.

0 Kudos
Message 14 of 15
(152 Views)

I'm still not clear that I get your use case, but let me suggest an idea that worked for me.  I was given a "Test Array" of 24 "stationed" (which I called "S 1" through "S 24").  They were arranged in a rack in a fixed 2D order, as follows:

Station Status Cluster.png

You might think these were Boolean Indicators, but they are actually Boolean Controls -- the Operator chooses the Test Station by "pushing the button", which lights it up "Bright Green".  Of course, to get the numbering and spacing (there are two racks of 12 Stations, and the numbers are not "spatially logical", if you get what I mean), so what I'm showing isn't a LabVIEW Array, but rather a Cluster.

 

But how to manage this?  Well, that was a little "clumsy", but it only happened once.  I created a Reference for each of the Controls and built an Array of References, which was kept in a convenient Shift Register in an Action Engine.  The Action Engine got fed the Array of References for its "Init" Action, which it used to create the Shift Register to store this Array.  The other Actions took a Station # and a Action and performed the Action on that Station.  So the Action "On" gets the Reference and uses it to set the Boolean values to True.  

 

It turns out that during the Test, one or more Stations indicates a change in status.  [I actually re-used this design when I programmed a Battery Charger that similarly had multiple Stations, and I wanted to show both "which stations were active" and also an indication of "% Charge").  But how to do that with a Boolean Indicator?  Well, "On/Off" is simply "True/False".  To get Status, I changed the color of the Indicator.

 

And another win for the Cluster, where you can have multiple Booleans with different Properties, unlike an Array of Booleans.  The Action "Show" makes the Boolean "Visible".  The Action "Red" changes the colors to "Shades of Red", etc.

 

This might not be what you are trying to do, but if it fits, this way worked for me and was convenient for the User (which, after all, was the purpose).

 

Bob Schor

 

 

0 Kudos
Message 15 of 15
(129 Views)