What I usually do when formatting text is to work with one buffer, and
insert the text needed as you go. For instance:
Start off with a StrCopy of your Primary intention. If you want a space/
tab before your Primary intention, then StrCopy that in, and StrCat all
following data into the main buffer.
StrCat a newline character in '\0A'.
StrCat an arbitrary number of spaces in.
etc...
Display the string in the text field.
When you need to modify, you can search through your output buffer for
the text that precedes and follows the point you want to insert data,
using a for loop structure, then insert.
Each time you update the string, clear out the text field and redraw
the string buffer. Make sure you clean up all leftover memory handles,
etc.
-Rus
>Heather Gazdik wrote:
>> HI,
>> I am pulling text from PDB file. I want to format that text.
>> For example: I want an answer to show up in a text field like this:
>> 1. Primary intention
>> 2. Secondary intention
>> 3. Tertiary intention (delayed
>primary intention)
>>
>> although in the pdb file it will look like this:
>> 1. Primary intention 2. Secondary intention 3. Tertiary
>intention (delayed
>> primary intention)
>>
>> How do I go about formating data on the palm??
>>
>> Thanks,
>> Heather Gazdik
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/