Set Color of Autocomplete TextBox items in Wondows Forms Application

Ashu1010
 
on Mar 15, 2018 04:48 AM
3941 Views

 

            cn.Open();
            SqlCommand cmd = new SqlCommand("select patientname from opddata", cn);
            SqlDataReader dr = cmd.ExecuteReader();
            AutoCompleteStringCollection mycollection = new AutoCompleteStringCollection();
            while (dr.Read())
            {
                mycollection.Add(dr.GetString(0));
            }

            txtpatientname.AutoCompleteCustomSource = mycollection;
            cn.Close();

Hello sir i have fetched some name in the textbox with help of above code. And now i want to set color to the items of textbox how to do that

its an windows based app

autocompletestringcoll is an method to store multiple data to display in textbox or dropdownlist

i want to set color to the items which i had got in the object of autocompletestringcollection

Download FREE API for Word, Excel and PDF in ASP.Net: Download
Results 1 - 5 of 8
Mudassar
 
on Mar 15, 2018 06:51 AM

Explain more details:

1. Which application, Windows or Web?

2. What is AutoCompleteStringCollection?

3. What exactly you are trying to do?

Ashu1010
 
on Mar 15, 2018 07:56 AM

its an windows based app

autocompletestringcoll is an method to store multiple data to display in textbox or dropdownlist

i want to set color to the items which i had got in the object of autocompletestringcollection 

Mudassar
 
on Mar 16, 2018 03:02 AM

autocompletestringcollection class is unknown to us, explain more details

kalpesh
 
on Mar 16, 2018 04:39 AM

Not possible to set the color to the the list object to AutoCompleteStringCollection You can refer the below link for customize autocomplete

https://code.msdn.microsoft.com/windowsdesktop/Customized-Autocomplete-c17bbba7

 

Ashu1010
 
on Mar 16, 2018 05:59 AM

https://drive.google.com/open?id=1yRWaNSRrbm7AxVi0tJDIAqC7Ud62djZt

this is the orginal result i got 

https://drive.google.com/open?id=19cxw9r1VGd3xdoZyco22wwiUeSnpBnJL

but i want the result like above image is it possible in another ways to obtain this?

 

Please check all about my result

Results 1 - 5 of 8