IControl.Brush

Syntax

Brush: IGxBrush;

Description

The Brush property determines the brush that is used to fill the component area.

Comments

The following components support this property:

Example

Executing the example requires a form and a button named Button1 on it.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    r: IGxRect;
    StColor, EndColor: IGxColor;
    Br: IGxBrush;
Begin
    r := New GxRect.Create(00, Self.Width, Self.Height);
    StColor := GxColor.FromName("CornflowerBlue");
    EndColor := GxColor.FromName("Crimson");
    Br := New GxLinearGradientBrush.Create(StColor, EndColor, 30, r);
    Self.Brush := Br;
End Sub Button1OnClick;

After executing the example on pressing the button, the whole area of the form is filled using two-color gradient. The gradient slope angle is 30 degrees.

See also:

IControl