Click here to Skip to main content
6,293,171 members and growing! (11,541 online)
Email Password   helpLost your password?
Desktop Development » Combo & List Boxes » General     Intermediate

Look-up ComboBox

By dotNet Toys

The article contains LookupComboBox control.
C#, .NET, Win2K, WinXP, Win2003, Visual Studio, WinForms, Dev
Posted:18 Apr 2005
Updated:6 May 2005
Views:74,345
Bookmarked:54 times
Announcements
Loading...
 
Search    
Advanced Search
printPrint   Broken Article?Report       add Share
  Discuss Discuss   Recommend Article Email
20 votes for this article.
Popularity: 5.69 Rating: 4.38 out of 5
1 vote, 5.0%
1
1 vote, 5.0%
2
1 vote, 5.0%
3
4 votes, 20.0%
4
13 votes, 65.0%
5

Introduction

.NET Framework 1.1 has a wide variety of visual components available for Windows Forms applications. Anyhow there is no ComboBox component with the possibility of look-up data defined in the Items property (or bound DataSource) of ComboBox. This article describes a look-up ComboBox with the ability to find an appropriate item in ComboBox items.

Features

The main good feature of the ComboBox is that the ComboBox has a property AllowTypeAllSymbols. If the property is true you can type any symbols in the ComboBox textbox. The items will be selected according to the first correctly entered symbol. For example, if the ComboBox holds "Item 1", "Item 2", "Test 1", "Test 2", "Combo", "Box" and if you enter "it", Item 1 will be selected. Again, if you enter "itm", "Item 1" will be selected. This way you can continue to enter any amount of symbols.

If AllTypeAllSymbols is false, you will be able to enter only those symbols, that are defined in the string of Items (or bound DateSource) property. For this example you will be able to enter only i, t, c, b as a first symbol. If you enter "i" as a first symbol - "Item 1" will be automatically selected, the second symbol can only be "t", you will not be able to enter any other symbol. "Item 2" will be selected only if you type the whole string "Item 2". The demo application shows this functionality.

Using the code

You can just add lookupcombobbox.dll to your project and use it for any Windows Forms application.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

dotNet Toys


Member

Occupation: Web Developer
Location: Russian Federation Russian Federation

Other popular Combo & List Boxes articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 10 of 10 (Total in Forum: 10) (Refresh)FirstPrevNext
GeneralComponent not Visible Pinmemberpcjd635:04 1 Dec '07  
GeneralAnother Bug PinmemberSebastian P.R. Gingter0:37 27 Jun '07  
GeneralNew Bug Pinmemberchris1756:58 12 Feb '07  
GeneralQuestion. Pinmemberlishe21:43 23 Nov '06  
GeneralRe: Question. Pinmembernickong23:52 8 May '07  
GeneralPossible Bug? Pinmemberbmcneill021:43 28 Jun '06  
GeneralAdditional bug found Pinmemberbriannacd5:40 7 Jun '05  
GeneralBug PinmemberJosef Meile1:10 2 May '05  
GeneralRe: Bug PinmemberJosef Meile3:28 2 May '05  
GeneralRe: Bug PinmemberdotNet Toys23:18 4 May '05  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 6 May 2005
Editor: Smitha Vijayan
Copyright 2005 by dotNet Toys
Everything else Copyright © CodeProject, 1999-2009
Web18 | Advertise on the Code Project