Center label text vertically

BlitzMax Forums/MaxGUI Module/Center label text vertically

TomToad(Posted 2016) [#1]
Any way to center the text on a label vertically in MaxGUI?


Henri(Posted 2016) [#2]
Hi,

you can (at least single line text and for Windows), but you need to somehow add '| SS_CENTERIMAGE' -style to label creating code in win32maxguiex.bmx . Alternatively change the Window style with Get / SetWindowLong (or something to that effect).

-Henri


TomToad(Posted 2016) [#3]
Thanks. That worked out perfectly.
Local style:Int = GetWindowLongA(TWindowsGadget(Label)._hwnd,GWL_STYLE)|SS_CENTERIMAGE
SetWindowLongA(TWindowsGadget(Label)._hwnd,GWL_STYLE,style)