StringGadget Center Text
Posted: Mon Jun 10, 2013 11:23 pm
How would I go about center aligning the text inside of a StringGadget.


http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
Define.i gf
gf = gf|#PB_Text_Center ; text is centered in the gadget.
;gf = gf|#PB_Text_Right ; text is right aligned.
;gf = gf|0 ; text is left aligned by default.
mystringgadget_n = StringGadget(#PB_Any, x, y, Wd, Ht, Txt$, gf|#ES_NOHIDESEL)
It's a no go, #PB_Text_Center doesn't seem to work.skywalk wrote:Windows snippet only I think...Code: Select all
Define.i gf gf = gf|#PB_Text_Center ; text is centered in the gadget. ;gf = gf|#PB_Text_Right ; text is right aligned. ;gf = gf|0 ; text is left aligned by default. mystringgadget_n = StringGadget(#PB_Any, x, y, Wd, Ht, Txt$, gf|#ES_NOHIDESEL)