c# - How change the color of SelectedItem in CheckedListBox in WindowsForms? -


I want to change the color of hidden items in CheckedListBox in C # WindowsForms.

Can anyone help me in solving this problem!

This should start with I have a checked listbox subclassed and drawing event The result is that the items checked in the list are drawn from the red background.

Playing around this, if you want to see the area behind the checkbox as a different color, then use e Griffix. Before calling on File Rectangle base.OnDrawItem .

ColoredCheckedListBox: Checked Listbox {Safe Override Zero OnDrawItem (DrawItemEventArgs E) {DrawItemEventArgs e2 = New DrawItemEventArgs (E. Graphics, E. Font, New Rectangle (E. Bounds.Space, E. Bounce Size), E. Index, E. State, E. Four Collar, Check Indians, Canton (E. Index) Color: Red: SystemCollars. Window); Base.OnDrawItem (E2); }}

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -