At 12:42 PM -0500 6/5/01, Kevin Mckee wrote:
>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.

[ code snipped ]

Your problem is you are measuring the wrong thing.

What you need to know is not how many characters the string occupies in memory,
but rather how many pixels wide the string will will be when drawn on the screen.

Fortunately, the Palm OS has a function that will tell you exactly that:
        FntCharsWidth
-- 
-- Marshall

Marshall Clow     Idio Software   <mailto:[EMAIL PROTECTED]>

It is by caffeine alone I set my mind in motion.
It is by the beans of Java that thoughts acquire speed,
the hands acquire shaking, the shaking becomes a warning.
It is by caffeine alone I set my mind in motion.

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to