In your ListDrawFunc, you need to use itemNum as your array index, not
i.

> -----Original Message-----
> From: Sun ribo [mailto:[EMAIL PROTECTED] 
> Sent: Monday, July 28, 2003 8:48 PM
> To: Palm Developer Forum
> Subject: Re: how can i insert a items into a list dynamic?
> 
> 
> is there any solution?
> i tried as below:
> 
> //in  MainFormInit
> FormPtr form = FrmGetActiveForm();
> ListType *listp = GetObjectPtr( MainOption1List ); 
> LstSetListChoices( listp, NULL, 3 ); LstSetDrawFunction( 
> listp, (ListDrawDataFuncPtr)ListDrawFunc);
> 
> // ListDrawFunc
> static void ListDrawFunc(UInt16 itemNum, RectanglePtr bounds, 
> Char** data) {  int i = 0;  WinDrawChars( data[i], 
> StrLen(data[i]), bounds->topLeft.x,
> bounds->topLeft.y);
>  i += 1;
> }
> 
> but it doesn't work well.
> ���ơ�����
> 
> 
> "acky" <[EMAIL PROTECTED]> д����Ϣ����:[EMAIL PROTECTED]
> 
> Sunribo,���ã�
> 
> as far as i know ,there are no such function,you may reset 
> the list arrays.
> 
> 
> ======= 2003-07-28 10:27:00 �������������=======
> 
> >is there any functions like LstInsertItem**?
> >
> >
> >
> >--
> >For information on using the Palm Developer Forums, or to 
> unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
> 
> = = = = = = = = = = = = = = = = = = = =
> 
> 
> ������������������
> ��
> 
> 
> ����������������acky
> [EMAIL PROTECTED]
> ��������������������2003-07-28
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> 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/

Reply via email to