Table of Contents

Method DrawCheckBox

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

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

dc Graphics

The graphics context used to render the check box or radio button.

item ListControlItem

The list control item for which the check box or radio button is drawn.

container IListControlItemContainer

The container that hosts the list control item, or null if the item is not associated with a container.

paintRectangle RectD

The rectangle, in device-independent coordinates, that defines the area available for drawing the check box or radio button.

isSelected bool

true 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.