From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Horizontal scrollable Front panel as shown in the Below picture

ReddiMK_0-1619774730473.png

 

I would like to develop a front panel as shown in picture, I need to change the color box as event each color has a separate function.

So I had used Cluster array to resemble as shown in picture but I am successful to change the  color but unable to which array index it has changed .

I have attached the Vi I am working on.

 

0 Kudos
Message 1 of 8
(1,244 Views)
0 Kudos
Message 2 of 8
(1,206 Views)

So you want to change the color of the array element that has no value yet?

 

You can't change the color of the default\new element. Not while running anyway.

 

The default behavior of arrays isn't really suited for this kind of GUI...

 

You'd have to redesign your interface so you're not using the standard array functionality. I'd add my own scrollbar, manage it's min\max values, based on the nr of elements, hide the array's scrollbar and index. Then, with events, make the scrollbar control the array. This way, you can't scroll past the nr of elements (limit the shown array elements as well).

 

0 Kudos
Message 3 of 8
(1,196 Views)

Hi,

 


wiebe@CARYA wrote:

You'd have to redesign your interface so you're not using the standard array functionality. I'd …


I would even consider a MCL (MultiColumnListbox) to display all those items…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(1,193 Views)

I Thought of using Multicolumn list box..

How to insert the color box into the list box?

0 Kudos
Message 5 of 8
(1,191 Views)

Hi Reddi,

 


@ReddiMK wrote:

I Thought of using Multicolumn list box..

How to insert the color box into the list box?


You can fake the colorbox by changing the color of the cell…

 

Most often I use a MCL just for display, the user selects an entry to edit its parameters in separate controls:

(Here I just change the text color instead of the cell background color.)

You can show those additional controls all the time, or you can place them in a separate dialog VI which opens when needed…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 8
(1,186 Views)

@GerdW wrote:

Hi,

 


wiebe@CARYA wrote:

You'd have to redesign your interface so you're not using the standard array functionality. I'd …


I would even consider a MCL (MultiColumnListbox) to display all those items…


Internally, we use a grid control I made. It's not easy though.

 

It's a mixture of classes, a picture control and subpanel magic.

 

Others have used .NET or QControls for this. I use a grid control to minimize the number of dynamically started VIs. Not because starting them is slow, but because stopping them is slow. I'm talking a few million here...

 

I can't really share ATM, but with enough compromise, it is doable.

0 Kudos
Message 7 of 8
(1,118 Views)

If you go the multi column list box option, there are some keys that you can add to your ini file to have symbols in multiple columns. You can use the symbols to imitate a color box. See

https://lavag.org/topic/7002-multiple-glyphs-columns/page/3/

https://lavag.org/topic/18463-i-found-some-hidden-listbox-options/

mcduff

0 Kudos
Message 8 of 8
(1,087 Views)