LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

programmatically change tab page label font size

Hellow Fellow LabVIEW Lovers,

 

I thought this subject was easy with LV2009, somehow I cannot find the property for the "tab page label font size", yes, i also looked with the "pages" ref array from the tab ref, also no luck. Could someone point me to the right place? I would really appreciate your help. Thanks.

 

Bryan

0 Kudos
Message 1 of 7
(4,805 Views)

Odd,

The each tab is a page  Class Generic>Page.

  tab.png

This snippet shows that there are no objects on the page (like the lable)

However ,Page Propertise do not include lable.font.all elements

Page Properties Dim hasPlayer, playerversion hasPlayer = false playerversion = 10 Do While playerversion > 0 On Error Resume Next hasPlayer = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & playerversion))) If hasPlayer = true Then Exit Do playerversion = playerversion - 1 Loop is_FlashVersion = playerversion is_Flash = hasPlayer

Requires: Base Package

Inherits from Generic. View the class hierarchy.

Property Description
Colors Gets or sets the foreground and background colors of a tab control page. Details
Colors:BG Color Gets or sets the background color of the tab control page. Details
Colors:FG Color Gets or sets the foreground color of the tab control page. Details
Controls on Page[] Returns an array of references to the controls and indicators on a page. The order in which you place the objects on the page determines the index of the object in the array. For example, if the first object you place on the page is a numeric control, the index of the numeric control in the array returned by this property is 0. Details
Decorations on Page[] Gets an array of references to all decorations on a tab control page. Details
Description Gets or sets the description of a tab control page. Details
Independent Label Makes the tab control page caption independent of the page label. Details
Objects on Page[] Gets an array of references to all controls, indicators, and decorations on a page. Details
Page Enabled State Gets or sets the state of a tab control page to enabled, disabled, or disabled and grayed. Details
Page Label Gets the label of a tab control page. Details
Page Visible Shows or hides individual pages of a tab control. Details
Tab Caption Gets or sets the text of a caption on a tab control page. Details
Tip Strip Gets or sets the tip strip of a tab control page. Details

  Moreover, I can select a tab lable on the FP, change its font and EACH tab lable changes to the SAME font and color.

 

 

Must be some serious MAGIC in the background similar to how NI made Latching Bools.

 

Champions?


"Should be" isn't "Is" -Jay
Message 2 of 7
(4,794 Views)

Hi Jeff,

 

Thanks for clarifying and verifying my problem, hope someone can point to a solution to this as I belive many of us will need this if we want to code our panel appearance adapting to different display reolution. We need to be able to change the Page Label Font Size.

 

Bryan.

0 Kudos
Message 3 of 7
(4,757 Views)

You should be able to do this by demanding the Application font and setting the application font on the target machines..... I think.

 

Posting this as a feature to the Idea Exchange would allow other users to lend support for the feature you think is important.  If there is a good case for it perhaps NI WILL add these properties to Class>Generic>Pages or invent a specific class Tab>Page>Label.text.Fonts[].Allelements.

 

If not some work-arounds may present themselves as many developers do need a solution for this.


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 7
(4,750 Views)

Thanks for the tip of  Application font...if that is not working I shall make a feature request to NI. It looks there is no other work around to this problem.

 

 

0 Kudos
Message 5 of 7
(4,728 Views)

Please do go ahead and submit a product suggestion for this.  I also could not find a way to change the font/size of a tab control label.  As a workaround, you could place a string on top of that page label and programmatically change the size and font of the string.  Customizing the string indicator should make it look more like the actual tab control.  Not as a direct of a solution as I had hoped but that is the reason for product suggestions!

 

Cheers, 

Marti C
Applications Engineer
National Instruments
NI Medical
Message 6 of 7
(4,701 Views)

Feature addition request should be made to NI. tab>pagecaption.Font property.

Regards
Vipin Kumar
0 Kudos
Message 7 of 7
(3,795 Views)