Looks good. I would add: use LstGetSelectionText to get a pointer to the
selected string in the list. This way you don't have to maintain anything
for the trigger label.

Matt

----- Original Message -----
From: "Watson, Christopher" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, May 15, 2002 3:51 PM
Subject: RE: Setting list selection?


First-time answerer. Let's see if I get it right....

1. Use GetObjectPtr to get a pointer to the List object
2. Use LstSetListChoices to assign the choice string array
3. Use LstSetHeight to set the list's height, according to the number of
choices
4. Use LstSetSelection to set the list's current selection index, based on
the stored previously selected index
5. Use GetObjectPtr to get a pointer to the Trigger object
6. Use CtlSetLabel to set the label for the Trigger, according to the List
selection

���������������������������
Christopher Watson
Sr. Software Engineer
Interactive Web Media
Lightspan, Inc.
Tel 858.824.8457
Fax 858.824.8001
___________________________


-----Original Message-----
From: J. Hayes [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 15, 2002 12:30 PM
To: Palm Developer Forum
Subject: Setting list selection?


I have a pop up trigger connected to a list and it works fine except that
when I initialize the form, I want to be able to show the list selection
that was last chosen on the pop up trigger instead of the pop up triggers
label.  What's the best way to do this?

Jeremy Hayes

lstPauseButton=GetObjectPtr(frmP, OptionPauseButtonList);
LstSetListChoices(lstPauseButton,gButtonStr,BUTTON_NUM);
LstSetHeight(lstPauseButton,BUTTON_NUM);
LstSetSelection(lstPauseButton,gPauseButton);
trgPauseButton=GetObjectPtr(frmP, OptionPauseButtonPopTrigger);
CtlSetLabel(trgPauseButton,gButtonStr[gPauseButton]);

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




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

Reply via email to