> CtlSetLabel() is one of a group of functions where the new text can't
> be larger than the original text size.
Sorry, but it's not true. Look at what "Palm OS Reference" says:
---------------------------
This function resizes the width of the control to the size of the new
label.
This function stores the newLabel pointer in the control�s data
structure. It doesn�t make a copy of the string that is passed in.
Therefore, if you use CtlSetLabel, you must manage the string
yourself. You must ensure that it persists for as long as it is being
displayed (that is, for as long as the control is displayed or until you
call CtlSetLabel with a new string), and you must free the string
after it is no longer in use (typically after the form containing the
control is freed).
If you never use CtlSetLabel, you do not need to worry about
freeing a control�s label.
Make sure that controlP is not a graphical control or a slider
control. The graphical controls and slider control structures do not
contain a text label field, so attempting to set one will crash your
application.
---------------------------
Bozidar
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> Stringer
> Sent: Sunday, February 04, 2001 10:40 PM
> To: Palm Developer Forum
> Subject: Re: Problem in changing the label of a button.
>
>
> >From: Philip Sheard
> >To: Palm Developer Forum
> >Sent: 2/2/01 2:22 PM
> >Subject: Re: Problem in changing the label of a button.
>
> >> Guys I want to change the lable of a button dynamically, but by using
> >> "CtlSetlabel" I am unable to do it neither I am getting any error.
>
> >works for me.
>
> CtlSetLabel() is one of a group of functions where the new text can't
> be larger than the original text size.
>
> Its a very useful function, but you have to be very careful that
> original label is big enough!
>
> Roger Stringer
> Marietta Systems, Inc.
>
>
>
> --
> 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/