Method DrawCheckBox
DrawCheckBox(Graphics, ListControlItem, IListControlItemContainer?, RectD, bool)
Draws a check box or radio button for the specified list control item within the given rectangle, updating the drawing area as needed.
public virtual RectD DrawCheckBox(Graphics dc, ListControlItem item, IListControlItemContainer? container, RectD paintRectangle, bool isSelected)
Parameters
dcGraphicsThe graphics context used to render the check box or radio button.
itemListControlItemThe list control item for which the check box or radio button is drawn.
containerIListControlItemContainerThe container that hosts the list control item, or null if the item is not associated with a container.
paintRectangleRectDThe rectangle, in device-independent coordinates, that defines the area available for drawing the check box or radio button.
isSelectedbooltrue if the item is selected and the check box or radio button should be rendered in the selected state; otherwise, false.
Returns
- RectD
A RectD structure representing the updated area available for drawing the item's text after the check box or radio button is rendered.
Remarks
If the item does not display a check box or radio button, the method may still adjust the drawing area to maintain consistent text alignment and padding. Override this method to customize the appearance or behavior of check box or radio button rendering for list items.