Re: Add text to combo box only once

From: Maarten Wiltink (maarten_at_kittensandcats.net)
Date: 07/26/04


Date: Mon, 26 Jul 2004 08:00:18 +0200


"oldgreypole" <oldgreypole@btuiwa.com> wrote in message
news:s2XMc.4757$jq1.1395@nwrdny02.gnilink.net...

> How do I make it so the same string is not added to a combo box
> more than once?

if (ComboBox.Items.IndexOf(NewItem)<0)
then ComboBox.Items.Add(NewItem);

Groetjes,
Maarten Wiltink