From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string array label blocks boolean array underneath

Hi All,

 

I am trying to read a list of files then display this list on the front panel to allow users to select which file they would like to interact with.

 

I have an array of boolean blank buttons. Since all elements of an array have to have the same properties (ie labels) I have an array of string indicators transparently overlaid on top of the boolean array.

 

This looks as desired but the problem is the string indicators block the buttons from being clicked. Below is a screenshot showing the transparent string label blocking the button.

 

Any advice for how to fix this or a work around would be very appreciated.

 

DP2018_0-1624042615469.png

 

 

 

0 Kudos
Message 1 of 7
(1,037 Views)

Why not use a multi-column list box instead. Much more powerful than the boolean array.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 7
(1,031 Views)

Use transparent buttons and put the strings underneath.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 3 of 7
(1,006 Views)

A list box was, and still is, a consideration. I just don't really care for how the list box looks aesthetically, nor would it match the rest of my programs aesthetically.

 

Neither of those reasons are deal breakers, I just didn't know if I was overlooking something obvious.

 

 

0 Kudos
Message 4 of 7
(988 Views)

There are plenty more scalable solutions but it is difficult to give advice without more information.

 

What the max number of buttons? (or is there no upper limit?)

Does the user select exactly one or several (zero to many)?

 

Possible solutions:

  • Listbox (as mentioned)
  • Cluster of buttons (you can hide unused elements)
  • Picture control
  • Array of strings (each string is the respective filename) and mouse down event can tell what element has been clicked.
  • etc.

What is the actual purpose of all this? Maybe there is a very different, but better solutions! What is your definition of "interact with"?

0 Kudos
Message 5 of 7
(976 Views)

I often mix control/indicator styles so that I can get a cohesive looking UI. You can do some interesting things with the classic controls. The system controls aren't too bad either and the NXG style is the most modern. I do put effort into our UIs so that they don't look anything like a LabVIEW application.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 6 of 7
(972 Views)

Here.  It's trivial.

"If you weren't supposed to push it, it wouldn't be a button."
Message 7 of 7
(965 Views)