Table of Contents

Method DrawLabel

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

DrawLabel(string, Font, Color, Color, Image?, RectD, GenericAlignment, int)

Draws text with the specified font, background and foreground colors, optional image, alignment and underlined mnemonic character.

public override RectD DrawLabel(string text, Font font, Color foreColor, Color backColor, Image? image, RectD rect, GenericAlignment alignment = GenericAlignment.Left, int indexAccel = -1)

Parameters

text string

Text to draw.

font Font

Font used to draw the text.

foreColor Color

Foreground color of the text.

backColor Color

Background color of the text. If parameter is equal to Empty, background will not be painted.

image Image

Optional image.

rect RectD

Rectangle in which drawing is performed.

alignment GenericAlignment

Alignment of the text.

indexAccel int

Index of underlined mnemonic character

Returns

RectD

The bounding rectangle.