If you're going to alter a label at run time, make sure you do not attempt
to write more characters to it than the label was originally designed to
hold (as Ben pointed out).  Pose may complain, but the warning does not
appear when running on a real device (which could be dangerous if you ignore
or didn't get the message on Pose)  My suggestion is to either write your
text directly to the screen using WinDrawChars or use a read-only edit
field.

> >
> > Hi
> >
> > I used FrmCopyLabel() and it worked, but I had to build the label in
> > constructor with some text in it or the programm would crash if I
> copied
> > some text with FrmCopyLabel into an empty label field.
> >
> > Strange: If I copied only 1 or 2 letters it worked but more the
> program
> > crashed.
>
> The reason is the FrmCopyLabel copies your new text directly into the
> structure for the form -- in memory, the form is allocated as a single
> chunk, with each control at its own position with the data for its label
> immediately following it.
>
> If you run with a debug 3.5 or 4.0 ROM image, it should warn you when
> you try to copy too much text into a label.
>
>
>
> --
> 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