Changing ChecklistBox's CheckBox Background Co

2019-09-19 06:17发布

i am working on checklistBox, wherein, i am filling the checklistBox at runtime from database, now while filling i check, for a condition, if its false than, that ListItem in CheckListBox should be disabled, else it should be enabled, its working properly, but i want to go one step ahead and want to change the background color of the disabled listItem. how to change the ListItem background color of the selected listItem.

1条回答
Juvenile、少年°
2楼-- · 2019-09-19 06:32

Thanks guys, I got the answer for my question..

In the for loop, this statement will change the color of checkBox within checklistBox:

checkListBox1.Items[i].Attribites.Add("style","background-color:red");
查看更多
登录 后发表回答