Button height calculation

Report problems with documented functionality
just me
Posts: 9574
Joined: 02 Oct 2013, 08:51
Location: Germany

Button height calculation

08 Dec 2015, 03:54

The docs wrote:Known limitation: Certain desktop themes might not display a button's text properly. If this occurs, try including -Wrap (minus Wrap) in the button's options. However, this also prevents having more than one line of text.

Source
Actually, -Wrap removes the BS_MULTILINE (0x2000) style, but the button's height is calculated for wrapped text anyway.

Code: Select all

#NoEnv
Gui, Margin, 150, 20
Gui, Add, Button, , Common Button
Gui, Add, Button, wp hwndHBTN -Wrap, Centered -Wrap Button
ControlGet, Styles1, Style, , , ahk_id %HBTN%
Gui, Add, Button, wp hwndHBTN, Centered Third Button
ControlGet, Styles2, Style, , , ahk_id %HBTN%
Gui, Show, , Button Test
MsgBox, 0, Styles, %Styles1%`n%Styles2%
Return
GuiClose:
ExitApp

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 22 guests