LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MultiColumn Listbox Background Color

I want to be able to change the background color of a cell for a Multicolumn Listbox. The properties node has a option called CellBG (Background color of the active Cell). When I try to write to the CellBG property I get an error "Error 1 occurred at Property Node (arg 2) in LstBx_BGColorChange.vi" Arg 2 is the CellBG property and Arg 1 is the ActiveCell Selection. I would appreciate any help.

A little more background on my application, I want to be able to change the cell background color when the cell value is above a threshold I set. This way a user can easily glance at the screen and see if there are any high values and where they are located.

Thanks in advance.

Nick Argyros
nargyros@yahoo.com
Nick Argyros
Interconnect Devices Inc.
Electrical Test Engeiner
nicka@idinet.com
0 Kudos
Message 1 of 10
(5,019 Views)
Looks like a bug with the classic multicolumn listbox. When I right-clicked the listbox and replaced it with a regular listbox, the command worked fine. Report it to NI.

___________________
Try to take over the world!
Message 2 of 10
(5,009 Views)
I didn't even think to try the other Multicolumn Listboxs types. I'm so use to using dialog controls. I'll use the standard multicolumn listbox for my application as a work around and submit a report to NI.

I appreciate your help.
Nick Argyros
Interconnect Devices Inc.
Electrical Test Engeiner
nicka@idinet.com
0 Kudos
Message 3 of 10
(5,006 Views)
Hi Nick,

that is actually not a bug but the desired behavior for 'dialog-style' controls. Their color is determined by the current desktop color settings. Take the 'Multicolumn Listbox' from the 'List & Table' Palette and it works. You will also notice that difference when you try to manually change the color of that control on the front panel.

You can find the following note in the LabVIEW help when you search for "dialog box, controls":
"Note You cannot customize the appearance of the dialog spin control, slide controls, or progress bars because the controls and indicators use platform-specific drawing functions that do not support customization. You also cannot use Property Nodes and Invoke Nodes to customize the appearance of these controls and indicators."

-B2k
Message 4 of 10
(4,995 Views)

I would like a NI updated response to this issue.  I'm experiencing a similar issue with Labview 2024.

0 Kudos
Message 5 of 10
(199 Views)

Hi Life,

 


@Life-longLearner wrote:

I would like a NI updated response to this issue. 


It's not an "issue", it's the defined behaviour of "system-style" frontpanel elements…

 


@Life-longLearner wrote:

I'm experiencing a similar issue with Labview 2024.


Please define "similar" with respect to the OP question!

Best regards,
GerdW


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

When trying to highlight the active cell of a single-row Multicolumn Listbox ("Sensor Type"), I'm feeding the CellBG color value from a different Multicolumn Listbox ("I.D. Number").  "I.D. Number" is a single-column Multicolumn Listbox, and its active cell highlights correctly.  However, there is no change to any of the the cell background colors of the "Sensor Type" Multicolumn Listbox.  I'd be happy to provide additional information, but I'm not sure what you need.  

 

LifelongLearner_0-1752603873700.png

LifelongLearner_1-1752604240984.png

 

 

0 Kudos
Message 7 of 10
(187 Views)

Hi Life,

 


@Life-longLearner wrote:

When trying to highlight the active cell of a single-row Multicolumn Listbox ("Sensor Type"), I'm feeding the CellBG color value from a different Multicolumn Listbox


Where do you set/define the ActiveCell(s)?

Best regards,
GerdW


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

I have the ActiveCell defined as shown below.  That wire diagram also shows my current configuration of the other parameters.  It allows for the highlighting of the ActiveCell.  It also allows, for the most part, the un-highlighting of the 1st cell, when the 1st cell is not selected.  However, there is still a dotted box around the text of the 1st cell as shown in the other screenshot.  I have the Selection Mode set to not highlight the entire row.  When I turned Highlight Entire Row on and turned SelColor to transparent, the actual SelColor was not transparent but was translucent.  Therefore, I determined the current configuration was my best option.  Now I just want to eliminate the dotted box around the text.  It does go away when I click off of the listbox.  

 

LifelongLearner_1-1752669462759.png

 

 

LifelongLearner_2-1752669512932.png

 

 

0 Kudos
Message 9 of 10
(139 Views)

@Life-longLearner wrote:

I have the ActiveCell defined as shown below.  That wire diagram also shows my current configuration of the other parameters.  It allows for the highlighting of the ActiveCell.  It also allows, for the most part, the un-highlighting of the 1st cell, when the 1st cell is not selected.  However, there is still a dotted box around the text of the 1st cell as shown in the other screenshot.  I have the Selection Mode set to not highlight the entire row.  When I turned Highlight Entire Row on and turned SelColor to transparent, the actual SelColor was not transparent but was translucent.  Therefore, I determined the current configuration was my best option.  Now I just want to eliminate the dotted box around the text.  It does go away when I click off of the listbox.  

 

LifelongLearner_1-1752669462759.png

 

 

LifelongLearner_2-1752669512932.png

 

 


Well, that's not the same code you showed before, and it's only a partial image of the code, but if you don't care about the value of the control, you can disable it (or make it an indicator and feed it a value of -1, so that it's not selected) and just keep your existing code for highlighting a specific cell (with whatever logic you have for cancelling it later).


___________________
Try to take over the world!
0 Kudos
Message 10 of 10
(103 Views)