
StringGadget Center Text
StringGadget Center Text
How would I go about center aligning the text inside of a StringGadget.


Re: StringGadget Center Text
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)
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: StringGadget Center Text
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)
Re: StringGadget Center Text
try: StringGadget(1, 10, 45, 150, 20, "-1.234e-12", #ES_CENTER)
EDIT:
Both #ES_CENTER and #PB_TEXT_CENTER = 1 and work for me on PB 5.11, Win7 x86.
EDIT:
Both #ES_CENTER and #PB_TEXT_CENTER = 1 and work for me on PB 5.11, Win7 x86.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum