last time.

BlitzPlus Forums/BlitzPlus Programming/last time.

Guess this is the last time i will bother asking this as I have wasted a days programming already! I think there is an incconsistency between StringWidth() and GadgetWidth() do they even take parameters in pixels?

I want to create a label:

txt$ = "123"
CreateLabel( txt$, 0,0, StringWidth(txt$), FontHeight(), hnd )

the label width does not match the width of the string, ie: StringWidth(txt$) returns 32, the label at 32 pixels wide is greater than required for a string of "123". I will be creating various labels of differing widths and need to centre them relative to a panel gadget so i really, really need to set the label dimensions to match that of the string.