Advertisement

02.16.2008 at 04:40PM PST, ID: 23169031
[x]
Attachment Details

Listing Problem in AutoComplete Textbox Control

Asked by biplavo in Microsoft Visual C#.Net, C# Programming Language, Microsoft Visual Basic.Net

Tags: C#,VB.Net

I have an autocomplete textbox. When i press a certain key , it lists out several items.
But i have to scroll down the list to see all the items.What i want to know is that how can we increase the height of the listing?

Any idea guys?Start Free Trial
[+][-]02.16.2008 at 07:26PM PST, ID: 20912472

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.16.2008 at 07:43PM PST, ID: 20912594

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.16.2008 at 08:10PM PST, ID: 20912785

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.16.2008 at 09:26PM PST, ID: 20913081

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.17.2008 at 04:19AM PST, ID: 20913803

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.17.2008 at 10:49AM PST, ID: 20914976

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.17.2008 at 11:28AM PST, ID: 20915132

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.17.2008 at 11:32AM PST, ID: 20915140

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.21.2008 at 12:49PM PST, ID: 20951706

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.21.2008 at 05:36PM PST, ID: 20953880

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.23.2008 at 09:51AM PST, ID: 20965814

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual C#.Net, C# Programming Language, Microsoft Visual Basic.Net
Tags: C#,VB.Net
Sign Up Now!
Solution Provided By: Priest04
Participating Experts: 2
Solution Grade: A
 
 
[+][-]02.23.2008 at 11:16AM PST, ID: 20966227

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.23.2008 at 05:56PM PST, ID: 20967807

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.23.2008 at 06:08PM PST, ID: 20967834

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • Automotive
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Displays / Monitors
  • Handhelds / PDAs
  • Components
  • Peripherals
  • Laptops/Notebooks
  • Servers
  • Misc
  • Apple
  • Embedded Hardware
  • Networking Hardware
  • Storage
  • Desktops
  • New Users
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMware
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Virtualization
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • Web Computing
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Consulting
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMware
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Automation
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Web Services
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Web Computing
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Lounge
  • Business Travel
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
  • Automotive
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
02.16.2008 at 07:26PM PST, ID: 20912472
I am assumsing you meant ComboBox, not TextBox. Set comboBox1.MaxDropDownItems to number of items you want to be visible.

Goran
 
02.16.2008 at 07:43PM PST, ID: 20912594
No no , i have a textbox (VS 2005), where i have set its AutoCompleteSource property. I donot know whether you have tried it or not?
 
02.16.2008 at 08:10PM PST, ID: 20912785
Hello biplavo,

It might not be the answer you want to read, but unfortunately it seems that there is no way to control the amount of items that are displayed.


Regards,

Dabas
 
02.16.2008 at 09:26PM PST, ID: 20913081
Really..oh no...but there might be some trick...
 
02.17.2008 at 04:19AM PST, ID: 20913803
If you are really in need for this functionality, you could create your own control that will have one TextBox and one ListBox, This way you can control the height of the listbox. From the first thought, I don't think it is hard to create such control.

Goran
 
02.17.2008 at 10:49AM PST, ID: 20914976
Thanks for the idea Priest04. Do you have links to articles which gives idea about such controls?
I would be really thankful.
 
02.17.2008 at 11:28AM PST, ID: 20915132
Well, I don't believe you will find such a code on the web that implements such functionality, since it is quite uncommon demand. If you look at the programs like mozilla firefox, you will find that it also doesn't support what you are looking for (when typing web address), and its one of the best and most used browser. It is a common thing to expect from user to scroll down when list has more than a several items. What would you do if it has 100 items? You cant expect to show them all. And if you are going to use this control in commercial software, then you also need to think about the screen size and how many items can be shown to fit the screen. However if you do insist on the idea to make such a control then I suggest you start the project and ask when you get stuck somewhere. Here is what I think is needed:

1) You subscribe for one of the TextBox.KeyXXX event, where you will get the input from user and based on that input, you will filter your datasource that listbox is bound to (like datatable). If the items in listbox dont fit in listbox, then here is how you would resize it

http://windowsclient.net/blogs/faqs/archive/2006/05/30/how-do-i-set-the-width-of-a-listbox-to-fit-the-text.aspx

To set the height of the listbox you will multiply the item count with itemheight. You might need to add some pixels for the top and bottom borders width. Then you will make listbox visible to user.

2) If a match is found, you will show the whole listbox item text in your textbox, but you will select the part that is added to it, so when the user types further, it will erase the added text. This is not a hard thing to do, and involves a textBox Select method.

3) List is set invisible when user moves focus from textbox.

4) There is also a need for items in list to be selected when user moves mouse over it. This can easily be done with ListBox MouseMove event, where you will use ListBox IndexFromPoint method, which will retrieve index of the item that the mouse is over, and just pass this index to SelectedIndex property to select this item.

Of course, this doesn't cover all, but will get you started.

Goran
 
02.17.2008 at 11:32AM PST, ID: 20915140
Ah, I forgot to add, when user clicks on some item in listbox, selected item's text is set in textbox, and listbox becomes invisible.

Goran
 
02.21.2008 at 12:49PM PST, ID: 20951706
Dear Priest04, could you post the code for it , if you have time ..??
I am quite lost on what you said.
I will increase the points to 240.

Thank You!
 
02.21.2008 at 05:36PM PST, ID: 20953880
Thanks anyway Priest...anyway i got some idea to start...
Thanks for everything...
 
02.23.2008 at 09:51AM PST, ID: 20965814
I am sorry, biplavo, but it takes time to write this control, and I dont have much free time. However, as I have alrady said, I will try to help you in situations where you got stuck and don't know how to solve a particular problem.

Goran
Accepted Solution
 
02.23.2008 at 11:16AM PST, ID: 20966227
No problem Priest04, your suggestion was really helpful.
I accept your answer,

Thanks for everything.
 
02.23.2008 at 05:56PM PST, ID: 20967807
You are welcome.

Goran
 
02.23.2008 at 06:08PM PST, ID: 20967834
All Concerned (Asker and Experts),
 
New Feature Alert!
 
Please do not make any post of any kind after a "Closing Request" has been started by the asker - unless you have a specific objection.
 
Any post by anyone will stop the automated process and force the manual intervention of a Moderator/Admin.
 
If anyone has questions about the process, please post them here: http://www.experts-exchange.com/Q_23151688.html and not in this question.
 
biplavo - please start the process again and thank you for using it. When we all get used to the process, it will greatly improve the 'abandoned' question problem.
If you have specific responses or posts you need to make, please do so before starting the process again.
 
Vee_Mod
Experts Exchange Moderator
Link to CS-G post:
http://www.experts-exchange.com/Q_23187873.html
 
 
20080716-EE-VQP-32 / EE_QW_2_20070628