Skip to content

How do I change the CheckedListBox rectangle box color? #4591

Answered by RussKie
jonny-xhl asked this question in Q&A
Discussion options

You must be logged in to vote

You can't. CheckedListBox is essentially a ListBox control with ListBox.DrawMode = OwnerDrawFixed and custom drawn items. If you want custom checkboxes you would need to render those manually similarly to how it is done in CheckedListBox.

All rendering is done in OnDrawItem, including drawing checkboxes, background and text:

protected override void OnDrawItem(DrawItemEventArgs e)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jonny-xhl
Comment options

Answer selected by RussKie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #4580 on February 22, 2021 09:37.