Delphi Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreDelphi Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rating: Thread Rating: 3 votes, 3.33 average. Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 3rd, 2005, 04:54 PM
silvercover silvercover is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Location: Iran
Posts: 30 silvercover User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 31 sec
Reputation Power: 9
Send a message via Yahoo to silvercover
How to filter Combobox items on "OnChangeEvent"?

Hi folks:

I want to know how can I omit combox's items based on entered
value in edit section of combobox.assume that I have a combobox with these items:

1.Bob
2.David
3.Dan
4.Frank
5.Jack
6.John
7.Mary
8.Marley
9.Sara
10.Susan

I want that when I type for example Letter M,combobox shows
just those items which starts with letter M...

How can I do this?

Thanks in advance.

Reply With Quote
  #2  
Old May 4th, 2005, 09:51 AM
Aries-Belgium's Avatar
Aries-Belgium Aries-Belgium is offline
Coding is my mission
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Location: Willebroek, Belgium
Posts: 340 Aries-Belgium User rank is Sergeant Major (2000 - 5000 Reputation Level)Aries-Belgium User rank is Sergeant Major (2000 - 5000 Reputation Level)Aries-Belgium User rank is Sergeant Major (2000 - 5000 Reputation Level)Aries-Belgium User rank is Sergeant Major (2000 - 5000 Reputation Level)Aries-Belgium User rank is Sergeant Major (2000 - 5000 Reputation Level)Aries-Belgium User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 8 h 13 m 56 sec
Reputation Power: 40
First clear your list and build it up again ...

But where do you get your data from?

Reply With Quote
  #3  
Old May 6th, 2005, 10:27 AM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 9th Plane (9000 - 9499 posts)
 
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
Posts: 9,389 Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 1 Day 22 h 17 m 29 sec
Reputation Power: 4080
Personally, I think this is a bad approach. What if I make a typo? Now I can't see items beginning with another letter. There is a better way around this issue. The default combo box component already does something very nice. When you type the first letter, it scrolls down to the first item that starts with that letter. When you type the second letter, it scrolls down to the first item that begins with those two letters. All you have to do is ensure that the list of items is sorted in alphabetical order.
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne

Reply With Quote
  #4  
Old March 25th, 2008, 08:25 AM
handyjay handyjay is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 1 handyjay User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 11 sec
Reputation Power: 0
filter combobox when typing... here is the code

just add this. I put it in the page load

combobox1.AutoCompleteMode = AutoCompleteMode.Suggest
combobox1.AutoCompleteSource = AutoCompleteSource.ListItems

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreDelphi Programming > How to filter Combobox items on "OnChangeEvent"?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap