Hi there,
To get the text in the field, search the archives for textfield or SetFieldText(),
GetFieldText(),
FreeFieldText()... These functions are in almost every Palm books that I read.
After you get the string from your text field, you can pad it with this function (no
compiling and
testing ...)
// <->inString, string before and after padding
// -> maxlen, string len after padding
// -> ch, the character that you want to pad to the inString
// the input inString must have enough room for at least maxlen+1 characters.
//
void PadStringWithChar(Char *inString, UInt16 maxlen, Char ch)
{
Int16 i;
UInt16 len;
len = StrLen(inString);
for(i=len; i<maxlen; i++) {
inString[i] = ch;
}
if (len<maxlen) {
inString[maxlen] = nullChr;
}
}
If you want to pad the string with spaces, then you would call
PadStringWithChar(myString, 15, ' ');
Hope that helps.
tnn
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/