I have tried two variants:
1. One provided by you
2. Another is just FrmCopyLabel
Both work fine...
I use Palm 3.5 ROM Image. The only thing that you have not shown is the
nature of Label variable. If it is Label=FrmGetObjectIndex(frmP,AmountLabel)
it should work. Esle it will crash.
Anton

----- Original Message -----
From: "Coolly Lee" <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Saturday, September 01, 2001 2:29 PM
Subject: FrmHideObject and FrmShowObject Problems


> Dear Gurus,
>
>   I got problems in using FrmHideObject() and FrmShowObject()
> to erase/show the labels.
>
>   In my program, I use labels to show dynamic data. When data changed,
> the program calls FrmCopyLabel() to refresh the data to be shown.
> According to the Palm OS Reference, the FrmCopyLabel() redraws the new
> label without erasing the old one so that the end of the longer old label
> still
> shown on the form. To avoid this, the program should call FrmHideObject()
> and FrmShowObject() before and after calling FrmCopyLabel() respectively.
> But it doesn't work in my program. Did I miss something?
>
>   The code is like this:
> /*--------------------------------*/
> UInt32 amount;
> Char *label;
> ......
> label = (Char *) FrmGetLabel(frmP, AmountLabel);
> MakeAmountString(amount, label);    // covert the data into string
>
> FrmHideObject(frmP, AmountLabel);
> FrmCopyLabel(frmP, Label, label);
> FrmShowObject(frmP, AmountLabel);
>
> Any comment?
> Coolly
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
>



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

Reply via email to