LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change colour of selected tab in a tab control

Solved!
Go to solution

Hi,

 

I am looking to change the colour of the selected tab in a tab control.

 

For example I have a Tab Control with 3 tabs (P1, P2, P3). What I want is when P2 is selected, it is highlighted say by making the whole tab Red but P1 and P3 are say grey. Hence when say, P1 is then selected,it is Red and P2 + P3 are Grey.

 

Is there a way to do this - I have enabled Multiple colours in my Tab Control

 

 

Help would be appreciated

 

 

Cheers

 

Marsh

0 Kudos
Message 1 of 14
(8,762 Views)

Hi Marsh,

 

you can set colors by either right-click+Properties or by using property nodes. Just read the help for the properties of the tab control!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 14
(8,751 Views)
The VI here should be enought to get you there
--
Tim Elsey
Certified LabVIEW Architect
Message 3 of 14
(8,723 Views)

Here is my version allthough the one suggested is much better and efficient.

 

 

0 Kudos
Message 4 of 14
(8,704 Views)

This is a better option.  The VI is attached.

test.png

 

--
Tim Elsey
Certified LabVIEW Architect
Message 5 of 14
(8,693 Views)
Can you save that as a Labview 8.2 file please - I'm not as up to date as you!! Thanks and Sorry!
0 Kudos
Message 6 of 14
(8,686 Views)
Solution
Accepted by Magical Marshmallow
 
--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 7 of 14
(8,676 Views)
Howiya

I'm not sure if its as a result of using the VI you sent me earlier or not!

I have graphs on the Tabs on my Tab Control, these did update in real time however they now only update when you click back to the tab in question.

Is there a reason for this and how do I remedy this problem


Cheers

Marsh
0 Kudos
Message 8 of 14
(8,651 Views)

Magical Marshmallow wrote:
Howiya

I'm not sure if its as a result of using the VI you sent me earlier or not!

I have graphs on the Tabs on my Tab Control, these did update in real time however they now only update when you click back to the tab in question.

Is there a reason for this and how do I remedy this problem


Cheers

Marsh

 

It is expected behaviour that non-vislable graphs do not update if not visable. I can only guess that now that you have changed to background color it is taking longer to update them and now you can see the update happening.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 14
(8,648 Views)

Hi

 

Would it be possible to do something similar using images for the tabs, and change the image for the active tab?

 

Simon

LabVIEW 8.6 / 2009 / 2010
Vision Development Module 8.6 / 2009 / 2010
VBAI 3.6 / 2010
0 Kudos
Message 10 of 14
(8,589 Views)