how to get the width of a string

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

how to get the width of a string

rion10
there is a entry in my window, so I want to put a string to the entry box.
if the string is too long to fit the entry, so I need cut the string to be like this:
aaaaaa...bbb,
so, my question is how to get the width of the specify string with default font style.
Thanks for any hint!