Sergio, here's an example. I have a list of names (MainNamesList) in a
Form (MainForm). With 'LstGetSelectionText()', I get a 'CharPtr' variable
(cPName) to the item text selected.
Int16 iItemPos = 0;
CharPtr cPName;
(...)
iItemPos = LstGetSelection( GetObjectPtr(MainNamesList));
cPName = LstGetSelectionText( GetObjectPtr(MainNamesList), iItemPos );
Next, the 'GetObjectPtr()' function implementation:
void * GetObjectPtr(UInt16 objectID)
{
FormPtr frmP;
frmP = FrmGetActiveForm();
return FrmGetObjectPtr(frmP, FrmGetObjectIndex(frmP, objectID));
}
Ariel Ayala
Software Developer
Corrientes - Argentina
----- Original Message -----
From: "Matt Graham" <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, April 28, 2004 5:04 PM
Subject: Re: getting a item from the list
> Sergio Uyeda wrote:
> > How can I get a selected text from a list ? Im using the following
> > Int16 LstGetSelection (const ListType *listP)
> > Char *LstGetSelectionText (const ListType *listP, Int16
> > itemNum)
> > But these don't work.
>
> sure they do. You must not be using them right. In what way are they
> not working?
>
> --
> 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/