How can we calculate the width of a text object?
(StrLength(tab_name.String()) * GlobalVariable(letter_width))
This way is a very weak method, because It is letter’s width dependent. And If a font family doesn’t maintain constant letter width then my code is trash.
This only works with my font.
Does it only work with BBCode text? Perhaps.
width() method on normal text object returns 0
Tip: What I do, is a trick add variable(your text) + NewLine() then the TextObject has width and height, if you try to get TextObject.width() it works, I don’t know way but works