Width of the TextBox

Started by velasquez, August 25, 2014, 09:47:12 AM

Previous topic - Next topic

velasquez

I have a TextBox with font = MS Shell Dlg and size = 10.
Knowing the text it is possible to calculate the width of the TextBox before displaying?

Thanks.

owenwengerd

There are Windows API functions for this, but nothing exposed via OpenDCL that I can think of.

honkinberry

With the current text style set to Arial Narrow, and TEXTSIZE set to 10, the results of (textbox '((1 . "Sample")) work very well.

--J

Fred Tomke

Hi, honkinberry, that's great! I haven't known this yet. Great!
Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]