My initial knee-jerk suggestion is be to use FntWordWrap in a loop and see how many bytes you could fit on each line. My second suggestion is to create a dynamic field off-screen of the width you will be needing, then stuff the string into it, call field update, and then count the number of lines in the field. My third suggestion is to get the OS source and see how the field code works to actually do line wrapping for a given string.
Hope this helps, -DGA > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Subject: Size of field > > Is there some simple way, given a string of characters, to > figure out how > many lines a field will need to display all of the words in > the string? I > want to figure this out and then dynamically create the field > on a dynamic > form to display messages in a FrmDoDialog approach. I have everything > working, but need to be able to figure out before I create > the field how > many lines it will need so I know how big to make the dynamic form and > field. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
