At 07:23 PM 3/15/99 -0500, you wrote:
>When the program is started, and
>the user has not yet used the control, how do I set the label on the
>popup trigger.
Try LstSetSelection ( pList, indexOfItemToSet);
>Question 2 - I want to be notified whenever a selection is made from the
>list.
A popup trigger is a control, and will send you a ctlSelectEvent. Trap this
event, checking for the controlID to match the id of the popup trigger,
like so:
switch ( pEvent->data.ctlEnter.controlID)
case MainMyPopTrigger:
{
// popup trigger was closed. Maybe the selection changed in the associated
list.
// Get the list pointer, and see what the current selection is now
Word wID = FrmGetObjectIndex (pForm, MainMyList);
ListPtr pList = (ListPtr)FrmGetObjectPtr (pForm, wID);
Word wSelect = LstGetSelection (pList);
// you can get the selection's text too
CharPtr pszSelectText = LstGetSelectionText ( pList, wSelect);
...
}
Hope this helps!
Glenn
Glenn Bachmann
President
Bachmann Software and Services, LLC
http://www.bachmannsoftware.com
Software Development for Handheld & Mobile Computing, Windows and the Internet
Home of Bachmann Print Manager, the only graphical printing solution for
the Palm Computing Platform