Centering Text

BlitzPlus Forums/BlitzPlus Beginners Area/Centering Text

Eric(Posted 2005) [#1]
How can I center the Text in a "CreateLabel" Gadget?


Kevin_(Posted 2005) [#2]
First, labels are not proper gadgets because they don't generate any events.

Second, if you are trying to centre it, what are you trying to centre it against?


DH(Posted 2005) [#3]
Answering questions with questions...


MyText$ = "Try This On For Size"
TW = 14
CreateLabel( MyText$,x-((Len(MyText$)/2)*TW),y,Len(MyText$)*TW,20,mywin,mystyle)

This might help.. the 14 is a fudgefactor since I havn't tried this code out.. In theory it should work.


Eric(Posted 2005) [#4]
Thanks,
I will try this.