473,513 Members | 2,456 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ComboBox w/ DrawItem, AND AutoComplete

Hey guys,

I've got a combo box where I'm passing values to the ComboBox using a
listitem class I created. I use the listitem class to do three things:

1 - Send the display text (What you see in the pull down)
2 - Send the GUID of the item (hidden)
3 - Send the color that the item will be displayed in in the drop down.
I use the following code to do this in my OnDrawItem even:

String drawString =
this.cBxPlayerList.Items[e.Index].ToString();
Font drawFont = new Font("Veranda", 10, FontStyle.Bold);
aColor =
((ListItemSC)this.cBxPlayerList.Items[e.Index]).SelColor;
SolidBrush drawBrush = new SolidBrush(aColor);
PointF drawPoint = new PointF(e.Bounds.X, e.Bounds.Y);
e.Graphics.DrawString(drawString, drawFont, drawBrush,
drawPoint);
cBxPlayerList.AutoCompleteMode =
AutoCompleteMode.SuggestAppend;

Here is my problem, ever since doing this... the cursor / highlight on the
drop-down list is gone, and AutoComplete no longer works. Any idea?
Thanks!!!
Sep 30 '08 #1
0 1059

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

Similar topics

2
10621
by: VM | last post by:
How can I implement the autocomplete functionality in a Windows comboBox? Thanks.
0
1899
by: Andrew Baker | last post by:
Have a look at the code below. It's a really simple example where I have added two controls to a form, a textbox and a combo box. Both add owner drawn context menus to the controls, but the...
3
2223
by: RajW | last post by:
Is it possible to have an auto complete ComboBox in ASP.NET? I would like to create a ComboBox that functions similarly to the way that IE will try to autocomplete a URL as you type it in. ...
0
1723
by: Kenneth P. Graci | last post by:
Hi, vb.net - windows forms I need to know when the dropdown list on my derived combobox closes. There is a DropDown event and a OnDropDown override, but I want to know when it closes. It...
19
18293
by: Bernie Yaeger | last post by:
Everyone misses the point on this - what we need is a combobox autocomplete that is a dropdownlist only. When in dropdown mode, you can enter text - making that autocomplete is trivial. But when...
2
1626
by: Becker | last post by:
I have a need for a simple combobox on a form in one of my programs that represents city, state. I want to have it autocomplete as the user types. I have a table with these values (about 50k of...
2
2211
by: Kalvin | last post by:
I found some code in Google, don't remember where, for an AutoComplete combobox. Everything is great with it except for one thing. If I use the mouse to drop the list down, then start typing to...
4
5082
by: =?Utf-8?B?UmljaA==?= | last post by:
Greetings, I have to load 30,000 unique names into a combox. Filling a dataTable takes only a few milliseconds. But populating the combobox and displaying the list takes several seconds - way...
6
7310
by: ezyeric13 | last post by:
I have a series of ComboBox's Bound to a DataGridView and I turned the AutoComplete on for them so they list all the items in a certain collumn of the DataGridView. The problem is that when you...
0
7260
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,...
0
7384
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7099
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...
0
5685
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5086
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...
0
4746
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...
0
3233
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3222
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1594
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 ...

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.