How to add Bold font for GUI text button Topic is solved

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
pgeugene
Posts: 40
Joined: 27 Jun 2019, 04:36

How to add Bold font for GUI text button

27 May 2024, 05:38

I found CreateImageButton function script from below
viewtopic.php?p=556427#p556427

I found there is a line of the script which I believe I can add Bold format for the text inside the button

Code: Select all

MyGui.SetFont("s11", "Tahoma",)
I tried the below but not working

Code: Select all

MyGui.SetFont("s11", "Tahoma", "Bold")
Can somebody help me ?
Thank you
User avatar
boiler
Posts: 17409
Joined: 21 Dec 2014, 02:44

Re: How to add Bold font for GUI text button  Topic is solved

27 May 2024, 07:13

You can’t just add parameters to the SetFont method. Per the documentation, the first parameter is where you put all the options separated by a space:

Code: Select all

#Requires AutoHotkey v2.0
MyGui := Gui()
MyGui.SetFont("s11 bold", "Tahoma")
MyGui.Add("Button", "w100", "Clcik here")
MyGui.Show

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: jimmyche and 51 guests