SetFont problem

Discuss the future of the AutoHotkey language
Posts: 484
Joined: 17 Nov 2013, 11:32

SetFont problem

16 Aug 2017, 15:07

SetFont command has a difficult problem.

If you need to set the font of the control frequently.
Then there are two options:
1, use GUI.SetFont, but this will lose the default font
2, use Control.SetFont, but will cause the display to be abnormal. For example:

Code: [Select all] [Download] GeSHi © Codebox Plus

t:=Gui.addtext("x1 y0","aasdfsadgsdf")
s:=Gui.addtext("x1 y222","aasdfsadgsdf")"w444 h444")

So, can we add a more concise and direct way?
For example:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Posts: 5686
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: SetFont problem

26 Nov 2017, 01:51

The display is not abnormal. The text is merely truncated because the control is not resized when you change the font. This is unlikely to change.

If you want to use a font handle, you can simply send the WM_SETFONT message.

Return to “AutoHotkey v2 Development”

Who is online

Users browsing this forum: No registered users and 4 guests