04-30-2021 04:30 AM
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.
04-30-2021 07:44 AM - edited 04-30-2021 07:45 AM
EDIT: Never mind.
04-30-2021 07:55 AM
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).
04-30-2021 08:00 AM
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…
04-30-2021 08:02 AM
I Thought of using Multicolumn list box..
How to insert the color box into the list box?
04-30-2021 08:09 AM - edited 04-30-2021 08:16 AM
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…
05-03-2021 02:49 AM
@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.
05-03-2021 07:51 AM
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