Brush: IGxBrush;
The Brush property determines the brush that is used to fill the component area.
The following components support this property:
Form;
Component pages PageControl (objects of the PageControlSheet class).
Component pages Wizard (objects of the WizardPage class).
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(0, 0, 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: