If this is what you wish to do, I always have these functions in my proggies
to handle this:

[snip]
void *GetObjectPtr(UInt16 ownerForm, UInt16 fieldName)

{

return
FrmGetObjectPtr(FrmGetFormPtr(ownerForm),FrmGetObjectIndex(FrmGetFormPtr(own
erForm),fieldName));

}

void SetEditText(UInt16 ownerForm, UInt16 fieldName,Char *text)

{

FieldPtr THIS = GetObjectPtr(ownerForm, fieldName);

MemHandle h,old;

Char *dest;

if( text == NULL )

text = "";

h = MemHandleNew( StrLen( text ) + 1 );

dest = MemHandleLock( h );

StrCopy( dest, text );

MemHandleUnlock( h );

old = FldGetTextHandle( THIS );

FldSetTextHandle( THIS, h );

if( old != NULL )

MemHandleFree( old );

FldDrawField(THIS);

}

Char* GetEditText(FieldPtr THIS)

{

Char *text;

text=FldGetTextPtr(THIS);

if (!text)

text="";

return text;

}

[snap]

Then just:

SetEditText(frmMain, edtText, "");

for from frmMain and field edtText

/morten

"Morten Schmidt" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> What are you trying to do? Set the text to "" in the field or?
>
> /morten
>
>
>



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

Reply via email to