473,763 Members | 1,382 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need a Listbox to mimic the combo dropdown list

I have a textbox with a lookup button facility. What I would like to do is also offer a quick selection facility by having a dropdown list appear under the control once the user has typed a single character. The same kind of functionality that you see on website textboxes these days.

I don't want to use a combo, but I do like the fact that the dropdown list from a combo is highlighted by moving the mouse. Is it possible to make a standard listbox behave like this.

I did try the hover select of a listview control, but it was nasty.

Many thanks

Steve Le Monnier
Nov 16 '05 #1
4 1578
Steve

For to achieve what you want, you need in my opinion the listbox.findstr ing

http://msdn.microsoft.com/library/de...tringtopic.asp

I hope this helps?

Cor
Nov 16 '05 #2
Thanks for the info.

I've looked at that and I'm not to worried abou find the items in the list
box, the effect I'm trying to acheive is that of the blue bar that follows
the mouse when you move it over the records. Just like it does with the
combo drop-down list.

"Cor Ligthert" <no************ @planet.nl> wrote in message
news:O%******** ********@tk2msf tngp13.phx.gbl. ..
Steve

For to achieve what you want, you need in my opinion the
listbox.findstr ing

http://msdn.microsoft.com/library/de...tringtopic.asp

I hope this helps?

Cor

Nov 16 '05 #3
Steve

And did you select the item after finding it?

Cor
Nov 16 '05 #4
Hi Cor

I've found the solution I was looking for, so many thanks for your help. The solution itself was realy elegent and I'm kicking myself for not find it first. Anyway in the spirent of cooperation he is the code that's put a smile on my face.

private void listBox1_MouseM ove(object sender, System.Windows. Forms.MouseEven tArgs e)
{
listBox1.Select edIndex = listBox1.IndexF romPoint(e.X,e. Y);
}

Many thanks

Steve

"Cor Ligthert" <no************ @planet.nl> wrote in message news:eF******** ******@TK2MSFTN GP11.phx.gbl...
Steve

And did you select the item after finding it?

Cor

Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2661
by: David J | last post by:
Hi, I am strugling with the propertygrid and a listbox. I am using the universaldropdowneditor from the codeproject (code below). However I am populating the listbox via a datasource. The problem I am having is that when I have a value in the propertygird and edit that, I want the listbox to have the selectvalue equal to the value that is being edited. Just to make it clearer: PropgridVal = Germany Datasource=
1
3302
by: JNariss | last post by:
Hello, I have created a form called frmS2P with the following: 1 listbox called List11 which holds the contents of a query created off my table called tblRequestActions. The fields which the listbox holds are Request_ID and MoveNumber. 1 text box called Date which is populated with the default value of =Date( ).
4
4730
by: fat | last post by:
I have a drop down combo box that displays a list of customers , and the list is growing.. I would like to click the dropdown arrow and have a List box in a new form open, then i can choose a customer and pass it back to the combo box. can anyone help me thanks in advance d
2
1951
by: Sunray | last post by:
Hi I trying to get a single row of data onto a lisbox Reason: It is a sales form i have created , what i would like to ultimately achieve is this, On the form there is a list box and dropdown combo and it is linked to data1, when the sales person clicks on the dropdown combo a list of items in the database appear via a dbgrid with that name: for example if he clicked on paint only the paint items would appear and the then from the dbgrid he...
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9938
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9822
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3523
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.