LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the background color of a Tab Control from a VI

Hello,
 
I use a Tab Control (from Containers), which by default has a grey background.
I want to change the background color programmatically, that is from a LabVIEW VI.
 
Anybody know how to do this ?
Jan Nielsen
Freelance system analyst and LabVIEW programmer
0 Kudos
Message 1 of 15
(19,686 Views)
Use the F Color property of the Tab control to change its color programmatically. Smiley Wink
 
BTW, it is NOT the background color of the Tab; it is its foreground color. Smiley Happy
- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 2 of 15
(19,682 Views)

Hi Jan,

you have to allow different colors, then use the page references and change the color. See the attached example.

Mike

Message 3 of 15
(19,681 Views)
Yes, that worked - thanks a lot both of you !
Jan Nielsen
Freelance system analyst and LabVIEW programmer
0 Kudos
Message 4 of 15
(19,671 Views)

I have LV 8.2

Your tab control has two color red and green, each color for each tab on the front panel

I only found my tab control in the "container" palette, and only one color for two tabs.

where do you find your tab control with one color for each tab

 

I like your tab control

 

 

0 Kudos
Message 5 of 15
(19,439 Views)
It's the same control.  You have to "Allow Multiple Colors" in its properties to paint each tab a different color.
LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
Message 6 of 15
(19,436 Views)

BTW, you have to right-click the tab controls edge, then select 'Advanced >'.  You'll find it there. 

 

Or, you can do it programatically with property nodes.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
Message 7 of 15
(19,435 Views)

ok i'm missing something here no matter how many things i have tried i cannot get the tab control to change color. i have set it for multiple colors it just doesn't want to change.

 

i tried duplicating the example in my vi but am having difficulty adding the page property node.

 

when i do have a property node that appears correct i cannot connect it to the tabctrl property node.

 

so basically what i wish to know is what step am i missing.

0 Kudos
Message 8 of 15
(19,308 Views)
solved my problem
0 Kudos
Message 9 of 15
(19,304 Views)

Okay i have a similar issue. How do you change system tabs color? I keep getting errors. Ended up moving to modern tab to make it work. But i like system tabs look better. Is there anyway to do it on the system tab?

- A minute saved is a Minute earned!
0 Kudos
Message 10 of 15
(17,736 Views)