G
Guest
We have a Windows CE device that runs a .NET 1.1 application, which displays
text from a database field in a fixed (no autoresize) label. We use a
separate PC program to populate the database text field with the text to
display, which the CE device reads and displays. Thus, I need to limit what
the user can enter on the PC application so it will fit within the label that
is used on the CE device. The CE device label is using Microsoft Sans Serif
18 pt font (normal) and the label is 584 by 96 pixels. The PC application
will be using a different sized text box. How do I programmatically
determine in my PC application if the text the user entered in the text box
will display on the CE device without clipping? The CE code cannot change,
thus I need to determine as the user enters text on the PC app., if the text
will fit and if not, then prevent the user from entering any characters that
would cause the CE device to clip the text. I have tried using the
MeasureString method, but this does not take into account the height of the
text and also, the label/textbox dimensions determine if the text wraps to
another line. Any ideas?
text from a database field in a fixed (no autoresize) label. We use a
separate PC program to populate the database text field with the text to
display, which the CE device reads and displays. Thus, I need to limit what
the user can enter on the PC application so it will fit within the label that
is used on the CE device. The CE device label is using Microsoft Sans Serif
18 pt font (normal) and the label is 584 by 96 pixels. The PC application
will be using a different sized text box. How do I programmatically
determine in my PC application if the text the user entered in the text box
will display on the CE device without clipping? The CE code cannot change,
thus I need to determine as the user enters text on the PC app., if the text
will fit and if not, then prevent the user from entering any characters that
would cause the CE device to clip the text. I have tried using the
MeasureString method, but this does not take into account the height of the
text and also, the label/textbox dimensions determine if the text wraps to
another line. Any ideas?