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/