Set Color of Autocomplete TextBox items in Wondows Forms Application

Last Reply 10 months ago By Mudassar

Posted 10 months ago

 

            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

Results 1 - 5 of 8 12
Posted 10 months ago

Explain more details:

1. Which application, Windows or Web?

2. What is AutoCompleteStringCollection?

3. What exactly you are trying to do?


Posted 10 months ago

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 


Posted 10 months ago

autocompletestringcollection class is unknown to us, explain more details


Posted 10 months ago

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

 


Posted 10 months ago

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