IPPSwitchButton.Down

Syntax

Down: Boolean;

Description

The Down property determines in which state the button is.

Comments

If the property is set to True, the button is pressed, if the property is set to False, the button is not pressed. By default this property is set to False.

Example

Executing the example requires a form with the Button1 button and the PPButtonGroup component named PPButtonGroup1.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    cSwitchNormal, cSwitchBold, cSwitchItalic: IPPSwitchButton;
Begin
    Self.BeginUpdate;
    cSwitchNormal := New PPSwitchButton.Create;
    cSwitchBold := New PPSwitchButton.Create;
    cSwitchItalic := New PPSwitchButton.Create;
    PPButtonGroup1.Add(cSwitchNormal);
    PPButtonGroup1.Add(cSwitchBold);
    PPButtonGroup1.Add(cSwitchItalic);
    cSwitchNormal.Text := "Normal";
    cSwitchBold.Text := "Bold";
    cSwitchItalic.Text := "Italic";
    cSwitchNormal.Down := True;
    Self.EndUpdate;
End Sub Button1OnClick;

Clicking the button creates a group of three buttons in the PPButtonGroup1 component. By default the button with the Normal text is pressed.

See also:

IPPSwitchButton