hi dave,
if i'm going to update the selector trigger in this function...how should i go
abt doing it...(sorry that i'm just a beginner..thus i dun really know how to declare
ur function in my function)...n i have to set the label to a string "desc
updated"..can i do it like this-char gSelectorTriggerLabel[255]="desc update";
case frmDetailsSelIngredientsSelTrigger:
{
FrmGotoForm(FrmIngredientForm);
handled = true;
break;
}
-----Original Message-----
From: Dave Johnson <[EMAIL PROTECTED]>
Date: Sat, 08 Apr 2000 06:27:55 -0700
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Subject: Re: Selector Trigger
> Cherlene Lim wrote:
>
> > I have some problem in getting to display the selector trigger label
> >with the value that I wanted.
>
> Here's a snippet of code that works for me:
>
> // a global string variable to hold the label
> char gSelectorTriggerLabel[255]; // Max length of label is 255
> characters: plenty!
>
> void ChangeControlLabel( UInt16 controlID )
> {
> FormPtr frmP;
> ControlPtr contP;
>
> // Get the pointer to the control
> frmP = FrmGetActiveForm();
> contP = (ControlPtr)FrmGetObjectPtr(frmP, FrmGetObjectIndex(frmP,
> objectID));
>
> // Set the label
> CtlSetLabel( contP, gSelectorTriggerLabel );
> }
>
> CtlSetLabel doesn't make a copy of the string you pass in, so you need to
> make sure that it is never deleted (that's why I use a global above).
> Alternatively, you can use CtlGetLabel to get the original string and
> change it "in place", but if you do that you need to make sure you never
> make it longer than it was originally. If you do it that way, make the
> string very long in constructor.
>
> Dave
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please see
><A HREF="http://www.palm.com/devzone/mailinglists.html" TARGET="_new"><FONT
>COLOR="BLUE">http://www.palm.com/devzone/mailinglists.html</FONT></A>
>
>
--
_______________________________________________
Get your free email from http://www.graffiti.net
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html