Article View: borland.public.delphi.winforms.controls.using
Article #173How To Clear a Listbox Using an ArrayList DataSource?
From: Slagert
Date: Fri, 17 Aug 2007 19:16
Date: Fri, 17 Aug 2007 19:16
12 lines
1263 bytes
1263 bytes
How do I clear a Listbox that uses an ArrayList for its DataSource? If I try MyListBox.Items.Clear I get an exception telling me I can't change the listbox's ItemCollection if the DataSource is set. If I try MyArrayList.Clear I see that the array is cleared but the listbox is not. If I then add new items to the array they do not show in the listbox. So how do I clear a listbox if the datasource is set? -Andy
Technical Details
Message-ID:
<46c5f43d@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 1eff29,3dcc0d5f147f1726,start X-Google-Attributes: gid1eff29,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Slagert" <slagert@slagert.com> Newsgroups: borland.public.delphi.winforms.controls.using Subject: How To Clear a Listbox Using an ArrayList DataSource? Date: Fri, 17 Aug 2007 12:16:21 -0700 Lines: 14 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 NNTP-Posting-Host: 68.6.83.169 Message-ID: <46c5f43d@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1187378237 68.6.83.169 (17 Aug 2007 12:17:17 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail