Jump to content

How to set font size in GUICtrlCreateTabItem()


Recommended Posts

$tab = GUICtrlCreateTab(10, 10, 200, 100)

$tab0 = GUICtrlCreateTabItem("tab0")

I want to set tab0 font size to GUICtrlSetFont(-1, 9, 400, 4, "Aerial")

But, it seems useless by function GUICtrlSetFont().

please help me, i will wait online.

I'm not positive but I believe you will need to set it per control. (unless its the same font on every control in the gui)

Global $MainTabCtrl = GUICtrlCreateTab(0,34,650,550,$GUI_SS_DEFAULT_TAB)
Global $Page0 = GUICtrlCreateTabItem("Page0")

Global $editbox_page0 = GUICtrlCreateEdit('', 10, 110, 630, 480)
GUICtrlSetFont(-1, 9, 400, 4, "Aerial") 

Global $combo1_page0 = GUICtrlCreateCombo('', 20, 40, 110, 25, $GUI_SS_DEFAULT_COMBO)
GUICtrlSetFont(-1, 9, 400, 4, "Aerial")
Link to comment
Share on other sites

$tab = GUICtrlCreateTab(10, 10, 200, 100)

$tab0 = GUICtrlCreateTabItem("tab0")

I want to set tab0 font size to GUICtrlSetFont(-1, 9, 400, 4, "Aerial")

But, it seems useless by function GUICtrlSetFont().

please help me, i will wait online.

When you create a control it inherits the font of the parent so if you want all the controls in a tab to have a certain font then set the gui font with GuiSetFont not the tab font before you create the controls. This won't help if you later want to change the font for all the controls in a tab though.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

  • 2 weeks later...

thank you for you help. i've fixed this problem.

$MainTabCtrl = GUICtrlCreateTab(32, 48, 337, 177,$GUI_SS_DEFAULT_TAB)

GUICtrlSetFont($MainTabCtrl,18)

$Page0 = GUICtrlCreateTabItem("Page0")

if you want to change the "Page" size, you need to set its parent's font size. and the TabItem will inhert this font size.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...