IRibbonColorButton.AutoButtonBorder

Syntax

AutoButtonBorder: Boolean;

Description

The AutoButtonBorder property determines whether the frame is displayed around the color image if the color was selected using the Auto button.

Comments

If the property is set to True, on choosing the color by using the Auto button the corresponding color image under the button icon will be marked with border.

If the property is set to False, the image of selected color is displayed as a solid line.

This property is relevant if the ColorVisible property is set to True.

Example

Executing the example requires a form, a button named Button1 on it and the Ribbon component named Ribbon1. A tab and a panel are created on the ribbon of the Ribbon1 component.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    RPanel: IRibbonPanel;
    RColorBtn: IRibbonColorButton;
Begin
    RPanel := Ribbon1.ActiveCategory.Panels.Item(0);
    RColorBtn := New RibbonColorButton.Create;
    RPanel.Elements.Add(RColorBtn);
    RColorBtn.Text := "Color";
    RColorBtn.SplitButton := False;
    RColorBtn.ImageIndex := 0;
    RColorBtn.AutoButtonBorder := True;
    RColorBtn.AutoButtonCaption := "Auto";
    RColorBtn.AutoButtonColor := GxColor.FromName("Red");
    RColorBtn.AutoButtonOnTop := True;
    RColorBtn.AutoButtonTooltip := "Default color";
    RColorBtn.ColorVisible := True;
    RColorBtn.OtherButtonCaption := "All colors";
    RColorBtn.OtherButtonTooltip := "Select color in the dialog box";
End Sub Button1OnClick;

On clicking the button a button for color selection is created on the ribbon panel. Base parameters are defined for the button.

See also:

IRibbonColorButton