MobileForms Toolkit Documentation

Item.DrawAlignmentString Method (Graphics, String, Font, Brush, Rectangle, HorizontalAlignment, VerticalAlignment, Boolean)

Draws the specified text string in the specified rectangle with the specified Brush, Font and HorizontalAlignment objects

protected bool DrawAlignmentString(
Graphics gr,
string text,
Font font,
Brush foreBrush,
Rectangle layoutRectangle,
HorizontalAlignment alignment,
VerticalAlignment valign,
bool wrap
);

Parameters

gr
Graphics to use to draw the string.
text
String to draw.
font
Font object that defines the text format of the string.
foreBrush
Brush object that determines the color and texture of the drawn text.
layoutRectangle
Rectangle structure that specifies the location of the drawn text.
alignment
HorizontalAlignment enumeration that specify alignment of the drawn text.
valign
wrap
true if the text should be wrapped, false otherwise.

Return Value

true, if the text fits in the area, false otherwise

Remarks

The text represented by the s parameter is drawn inside the rectangle represented by the layoutRectangle and alignment parameter. If the text does not fit inside the rectangle, it is truncated.

See Also

Item Class | Resco.Controls.DetailView Namespace | Item.DrawAlignmentString Overload List