LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

scanning for keyFocus to set Boolean background color

Solved!
Go to solution

I searched for "ctl class colors[] property" before posting.

 

I've changed Boolean background colors via their individual colors[] propertiy but I was wondering if there's a way to scan controls[] refnums and set the background colors based on key focus True/False.

 

See the snippet. I don't see a background colors property in the ctl class. Is there another class beneath 'ctl' that allows one to set Boolean colors[] property?

 

Thanks,

Jeffrey Bledsoe
Electrical Engineer
0 Kudos
Message 1 of 3
(3,522 Views)
Solution
Accepted by topic author MinerHokieRamp

There is no property at the Control level.  You will have to cast to more specific "Boolean" to get the property.  However, you will have to do this in a case because it will error if the control is anything but Boolean.

 

Setting Color on Focus.png

Quentin "Q" Alldredge

Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner



Message 2 of 3
(3,514 Views)

That helped me arrive at a solution. I added some more logic to filter out indicators and Booleans that are skipped in tabbing. The code in the snippet can probably be simplified further.

 

Thanks,

 

Jeffrey Bledsoe
Electrical Engineer
0 Kudos
Message 3 of 3
(3,474 Views)