How to get textWidth and textHeight with MaxGui?

BlitzMax Forums/MaxGUI Module/How to get textWidth and textHeight with MaxGui?

Alessandro(Posted 2006) [#1]
Dear all,

I need to get textWidth and textHeight for a text based on a specific font, loaded using "LoadGuiFont()".

How can I do it?

I need this value since I want to create a library to automatically manage gadget position, based on the space used by a component.

Thank you!


tonyg(Posted 2006) [#2]
Fontsize for height.


Alessandro(Posted 2006) [#3]
Thank you, but that one is font size.
My problem is calculate gadget width (e.g.: Label) based on the text contained inside.

Example:

myLabel = "This is a test"

Now I want to calculate label width based on the pixels used from such text (using a specific font).

Thank you!


Alessandro(Posted 2006) [#4]
Can you suggest me a place where I can ask to Blitzmax team to insert a new function to perform the job I need?

Thank you!


tonyg(Posted 2006) [#5]
Sort of like a way to contact BRL directly? If not, post it in the BlitzMax GUI Programming and don't hold your breath for an answer.
Anyway, I am sure this was discussed and somebody found a workable solution.


Alessandro(Posted 2006) [#6]
Thank you for your suggestions!