Does any one know how to vertically align text in a static?
The text appears near the top border of the static and I would like a way to move it down slightly, best case would be centered.
I think you can do it with buttons but can't find anything on msdn about the same for statics.
Thanks,
Andy.
Andy,
Why not use a RichEdit Control?
AutoDefine "Off"
def win:window
def run,wstyle:int
wstyle = @MINBOX|@MAXBOX|@size|@TOOLWINDOW
' Create a window ..
OpenWindow win,0,0,480,300,wstyle,0," IWB Test Window",&messages
CONTROL win,@RICHEDIT,"TEST",150,100,12,100,@CTEDITRO|@CTEDITMULTI,100
'setcontroltext win,100,"Test"
run = 1
WAITUNTIL run = 0
CLOSEWINDOW win
END
'
' Main loop
'-------------------------------------------------------------------------------------
SUB messages(),int
SELECT @class
CASE @idcreate
centerwindow win
CASE @idclosewindow
run = 0
ENDSELECT
RETURN 0
EndSub
'-------------------------------------------------------------------------------------
'
Andy
Add a style of 0x200.
That will center the text exactly vertically in the box (give or take 1 pixel)
I need to add that flag to iwbstd.incc.
Larry,
That's perfect, thank you!
The text looks so much better now it's aligned.
Andy.
:)
Also came in handy for me. Makes the program look much cleaner.
Bill