Hi,

I am having problem with displaying a popup list. (1) shows the declaration
part. (2) & (3) show the codes for handling the event. However, I am not
getting the popSelectEvent, I am only getting some penUp/Down and
ctlSelectEvent evens. Any idea where I am making the mistake?

Thanks,
Jenni

(1)

    POPUPTRIGGER "" ID MyTrigger AT (4 42 152 10)
    LIST ID MyList AT (PREVLEFT PREVTOP AUTO AUTO)
        VISIBLEITEMS 3
    POPUPLIST MyTrigger MyList

(2)

    switch (eventP->eType) {

        case popSelectEvent:

            if (eventP->data.popSelect.listID == MyList) {
                DisplayPopUpList (eventP->data.popSelect.selection);
            }
            break;
    }

(3)

static void DisplayPopUpList (UInt16 selection)
{
    ControlType     *trigP;
    ListType           *listP;
    FormType        *frmP;

    frmP = FrmGetFormPtr(MainForm);
    trigP = (ControlType*)FrmGetObjectPtr (frmP, FrmGetObjectIndex (frmP,
MyTrigger));
    listP = (ListType*)FrmGetObjectPtr (frmP, FrmGetObjectIndex (frmP,
MyList));
    LstSetSelection (listP, selection);
    LstDrawList (listP);
    CtlSetLabel (trigP, LstGetSelectionText(listP, selection));
    FrmShowObject (frmP, FrmGetObjectIndex (frmP, MyList));
}

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

Reply via email to