Hi guys,
I have a similar problem, Iam not able to create a dynamic popup
list. I was able to create a dynamic list but Iam not clear about
popup list.
The LstNewList says that if I give the triggerID, then both my list
and trigger control are created. So I dont have to explicitly create
a trigger.
char** listLabel;
// so 40 is list id and 41 is trigger ID
LstNewList((void**)&gCurrentForm, 40, 10, 10, 50, 50, stdFont, 3,
41);
listPtr = (ListType*)FrmGetObjectPtr(gCurrentForm, 40);
listLabels = (Char**) MemPtrNew(v->elementCount * sizeof (Char*));
for (i = 0; i < listCount; i++) {
listLabels[i] = (Char*) MemPtrNew((tLength + 1)* sizeof
(Char));
MemMove(listLabels[i], /* some location */, tLength);
}
LstSetListChoices(listPtr, listLabels, listCount);
LstSetPosition(listPtr, 20, 20);
FrmShowObject(gCurrentForm, 40);
LstSetSelection(listPtr, 0);
LstDrawList(listPtr);
FrmSetFocus(gCurrentForm, 40);
This is my sample code. But Iam confused. This is my understanding, I
have to show the trigger to the user and when the user clicks on it
the popup list should be displayed.
Ok in that case, initially should I use the trigger ID or the list ID
(for FrmSetObjectPosition) to display the trigger to the user.
Does anyone have any code snippet for Dynamic popup list.
Thanks
Venkatesh
--- In [EMAIL PROTECTED], "Aaron Ardiri" <[EMAIL PROTECTED]>
wrote:
> > > > If I'm missing the obvious, please indulge me and point it
out.
> > >
> > > check FrmShowObject() - that should make your list visible and
enabled.
> >
> > Tried that - no good.
> >
> > Anyway, my code is full of things (like dynamic creation) that are
> > requiring PalmOS 3.0 and later.
>
> the docs say FrmShowObject() only works right on lists after 3.5.
what
> rom are you testing against? for compatibility, i would do direct
access
> prior to 3.5, and, post 3.5 - use the API call. otherwise you'll
run into
> issue on future devices.
>
> > So I should be able to get away with setting the bits.
>
> thats what we all say :) then the licensee goes and messes
everything up
>
> ---
> Aaron Ardiri [EMAIL PROTECTED]
> CEO - CTO +46 70 656
1143
> Mobile Wizardry
http://www.mobilewizardry.com/
>
>
> --
> 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/