Use a custom draw function. Read about it in the SDK.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:bounce-454120-
> [EMAIL PROTECTED] On Behalf Of druid
> Sent: Sunday, August 14, 2005 11:09 AM
> To: Palm Developer Forum
> Subject: Could use some direction on how to proceed
> 
> To fill a list with the first field of each record
> 
> 
> Err err = Open(); // routine to open database
>       Char **strArray = {""}; //empty array
>       nRecordIndex = DmNumRecords(dbPtr); // number of records
>       for(index =0; index < nRecordIndex; index++) // lets index
through
> database
>        {
>         h =DmQueryRecord(dbPtr, index); // lets query each record
>         RecordPtr = MemHandleLock(h);  // lets lock each record
> 
>         //need to extract first field of each record here and insert
it
> into
>         //a form list named frmList1
>         // I think I need to fill an array then asign the array to the
> list
>         //using LstSetListChoices
> 
>         MemHandleUnlock(h); // unlock each record
>        }
>       pForm = FrmGetActiveForm(); // get active form
>       lsp1 = FrmGetObjectPtr(pForm, FrmGetObjectIndex(pForm,
frmList1));
> // get id of list control
>       LstSetListChoices(lsp1,strArray,0); // clear list
> 
> 
>       // fill list with array
>       //Err err = CloseDB();
>       return true;
> --
> For information on using the PalmSource Developer Forums, or to
> unsubscribe, please see http://www.palmos.com/dev/support/forums/



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

Reply via email to