LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

What attribute is used to change the color of a tab in a TAB Control

SetPanelAttribute   (panelTab,  ATTR_BACKCOLOR,   foregroundColor); changes the color of a panel in a Tab control, but leaves the tab the previous color.  What Attribute is used to change the color of the tab itself?
0 Kudos
Message 1 of 6
(3,996 Views)

The function you are looking for is SetTabPageAttribute. The relevant attribute is ATTR_BACKCOLOR.

Hope this helps,

-alex

0 Kudos
Message 2 of 6
(3,988 Views)

Thank you Alex.

The documentation appears to be incorrect, does not describe SetTabPageAttribute:

Customizing the Appearance of a Tab Control

You can use SetCtrlAttribute to customize the appearance of the tab control.

By default, tabs appear in the top left corner of the tab control. You can configure them to appear in the top right, bottom left, or bottom right corners. When you place the tabs in these locations, the text is horizontal. You also can configure the tabs to appear on the right or left side of the tab control at the top or bottom of the tab. When you place the tabs in these locations, the text is vertical. Use the ATTR_TABS_LOCATION attribute to configure the location of the tabs.

Use the ATTR_TABS_FIT_MODE to customize how the tabs appear on the tab control. By default, the tabs appear in a single row aligned to the left, right, top, or bottom side of the tab. You can specify that the tabs appear in a single justified row, in a single row with a scroll button to view tabs that do not fit across the tab control, or in multiple rows.

0 Kudos
Message 3 of 6
(3,976 Views)

Hi.

The function you need is EasyTab_SetTabAttribute(int Panel, int Tab_Control, int Tab_PanelHandle, int Attribute, ...);

The attribute is ATTR_EASY_TAB_LABEL_BG_COLOR (label background color).

You're right; this function is not properly documented (at least in CVI v7.1.1), but you will find it if you open the instument (easytab.fp).

Good luck,
Colin.

 

0 Kudos
Message 4 of 6
(3,969 Views)
My answer was referencing the 8.0 tab control, which is different from the easytab tab control. The context of hendra's post led me to believe that was what he was using, which was confirmed by his second post. However, I'll make a note to make the help for both functions more visible.
 
Thanks,
 
-alex
0 Kudos
Message 5 of 6
(3,953 Views)

Sorry about that, Alex.

I think I'd better upgrade soon (before CVI 9 comes out ;)).

Regards,
Colin.

 

0 Kudos
Message 6 of 6
(3,926 Views)