To clear up the list box, try this: list = GetObjectPtr(ListResourceIndex); list->attr.usable = 0; LstEraseList(list);
After erasing the list, you may need to redraw the current form as well. On 7 Jan 2002 at 3:04, Andy Yeong wrote: From: "Andy Yeong" <[EMAIL PROTECTED]> Subject: How to remove a listbox ? Date sent: Mon, 7 Jan 2002 03:04:10 +0800 To: "Palm Developer Forum" <[EMAIL PROTECTED]> Send reply to: "Palm Developer Forum" <[EMAIL PROTECTED]> > Hi, > > I have a trigger button which will display > a list box when depressed. > > After displaying the list box, the 2nd time > the user click on it again, the list box suppose > to dissapear from the form. > > So far, I'm able to display the list box when the > user click on the button, however I couldn't quite > clear up the list box. Although the list box did > clear up abit from the form, a bit of it still left > behind. > > Anybody got any example to this ? > > My code in summary > ------------------ > > ListPtr list; > > *** To show ListBox *** > > list = GetObjectPtr(ListResourceIndex); > list->attr.usable = 1; > // And follow by the normal string init code > LstDrawList(list) > > *** To Clear up the ListBox *** > list = GetObjectPtr(ListResourceIndex); > list->attr.usable = 0; > LstDrawList(list) > > I even try using FrmDrawForm(FrmGetActiveForm()) > but it still left a part of the listbox behind. > > Thanks ! > > > > > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please > see http://www.palmos.com/dev/tech/support/forums/ > > John Leung [EMAIL PROTECTED] http://persweb.direct.ca/jleung -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
