Article View: borland.public.delphi.winforms.controls.using
Article #175Re: How To Clear a Listbox Using an ArrayList DataSource?
From: Marc Rohloff TeamB
Date: Fri, 24 Aug 2007 17:43
Date: Fri, 24 Aug 2007 17:43
18 lines
1892 bytes
1892 bytes
On Fri, 24 Aug 2007 09:31:16 -0700, Slagert wrote: > Ok, I'll answer this myself since nobody seems to be listening here... > > To empty a Delphi .Net listbox that uses an array for a data source just set > the listbox's datasource property to nil. For instance if your listbox is > named MyListbox you can use the following code to remove the items from the > listbox. > > MyListbox .DataSource := nil; > > There it is, now we have the answer. You could also set it to an empty array if it makes your code simpler. -- Marc Rohloff [TeamB] marc -at- marc rohloff -dot- com
Technical Details
Message-ID:
<1dn9x25noi344.dlg@dlg.marcrohloff.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!194.25.134.62.MISMATCH!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<46c5f43d@newsgroups.borland.com> <46cf07ee$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1eff29,3dcc0d5f147f1726 X-Google-Attributes: gid1eff29,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Marc Rohloff [TeamB]" <"on request"> Subject: Re: How To Clear a Listbox Using an ArrayList DataSource? Newsgroups: borland.public.delphi.winforms.controls.using User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit References: <46c5f43d@newsgroups.borland.com> <46cf07ee$1@newsgroups.borland.com> Date: Fri, 24 Aug 2007 13:43:00 -0400 Message-ID: <1dn9x25noi344.dlg@dlg.marcrohloff.com> X-Face: "huzh55Xi]!ZNni78>a*5+).`SK?<^q2MlHk-C]Z2M9T@\J5ZCB$95Ey+s"XQuhGFA[eutZ :0^AV!Q;t>gE`1-=8d;HZ6~*o1dH<X9\b$!|(}+I'!Xq)@3Op}%0ArW&nf'Qh*EwR X-Antivirus: avast! (VPS 000768-1, 08/24/2007), Outbound message X-Antivirus-Status: Clean NNTP-Posting-Host: 65.31.1.121 X-Trace: newsgroups.borland.com 1187977381 65.31.1.121 (24 Aug 2007 10:43:01 -0700) Lines: 18 X-Authenticated-User: mrohloff Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!194.25.134.62.MISMATCH!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail