I searched through the knowledge base and I can't seem to find anything related to 
what I want to do - I have found things
close however.

I have a popup trigger associated with a list that was created at design time.  When 
the form loads, I want the trigger to set
its item to the value from the database.

I used the code below to fill in the label:

char   txtTimeH[5];
ControlType  *trigTimeH;
trigTimeH = (ControlType*) GetObjectPtr(frmTestTimeHPopTrigger);
StrIToA(txtTimeH, s->TimeH);
CtlSetLabel(trigTimeH, txtTimeH);

And it works.

But when I go to save the form I use the following code:

 Char*    lblTimeH;
 ControlPtr  ctlTimeH;

   ctlTimeH = GetObjectPtr(frmTestTimeHPopTrigger);
   lblTimeH = (Char *) CtlGetLabel(ctlTimeH);

The code above doesn't give me the label of the trigger.

So either my code is bad - or there is a better way of doing this - by 
programmatically setting the popuptrigger to fire,
selecting the desired item.

So - which way should I go about this, and am I even on the right track?

Thanks,
Ed.



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

Reply via email to