I have a form that has some text fields in it. Each text field is set to
500 characters. The width of each field (on the form) is set at 102. The
rest of the data is displayed when a user taps on a "Note" icon (it pops up
a form that has a scrolling text field that can display the full 500
characters). I want the note icon to display only when more characters are
entered than can be displayed in the 102 width. The problem is that the
characters are not in a "fixed" width. In other words, the "W" takes up
more space that an "i" etc.
My question is how can I tell when the 102 field width is exceeded?
Here is what I have now;
The problem with this is that this is not an exact way to handle the number
of characters.
I can only put about 18 "W"s in the field then the rest of the characters
expand past the 102 field width and the "Note" icon doesn't appear because
25 characters haven't been entered yet. On the other hand, I can put about
33 "i"s in the text field and the "Note" icon will display BUT I still
haven't exceeded the length of the 102 field width.
if( (length >= 25) || (StrChr (str, '\n')!=NULL )) // if there is no
carriage return
FrmShowObject (frmP, FrmGetObjectIndex (frmP,
BitmapResourceID1900BitmapFamily ));
else
{
FrmHideObject (frmP, FrmGetObjectIndex (frmP,
BitmapResourceID1900BitmapFamily ));
if (ShowNote)
FrmShowObject (frmP, FrmGetObjectIndex (frmP,
BitmapResourceID1320BitmapFamily ));
}
Regards,
Kevin Mckee
[EMAIL PROTECTED]
http://www.fortsoft.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/