> // init the fields though they are not visible yet
> fld = FrmGetObjectPtr( frm, ... );
> FldSetTextHandle( fld, h );

Ah... Problem is, I have a whole subroutine for doing this stuff (writing a 
string to a field), because normally a bunch of other things have to be done 
too, and this subroutine calls FldDrawField at the end, which writes to the 
screen:

void SetFieldStrValue (UInt16 fieldID, Char *value)
{
    FormPtr frmP;
    FieldType *fldP;
    Char *fieldText;
    MemHandle h;

    frmP = FrmGetActiveForm ();
    fldP = FrmGetObjectPtr (frmP, FrmGetObjectIndex (frmP, fieldID));
    h = FldGetTextHandle (fldP);
    FldSetTextHandle (fldP, NULL);
    if (h == NULL)
        h = MemHandleNew (StrLen (value) + sizeOf7BitChar (chrNull));
    else
        MemHandleResize (h, StrLen (value) + sizeOf7BitChar (chrNull));
    fieldText = MemHandleLock (h);
    StrCopy (fieldText, value);
    MemHandleUnlock (h);
    FldSetTextHandle (fldP, h);
    FldDrawField (fldP);
}

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

Reply via email to