IRibbonComboBox.AutoComplete

Fore Syntax

AutoComplete: Boolean;

Fore.NET Syntax

AutoComplete: Boolean;

Description

The AutoComplete property indicates whether the autocomplete that is input in the text component is used.

Comments

The property is available to use if the DropDown style is set for the component.

If the property is set to True, when text is entered in the component editor, elements that contain entered text are searched and the first found element is placed automatically in formula. If it is set to False, elements are not searched.

By default this property is set to False.

Example

Executing the example requires a form, the Button1 button on this form 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;
    RCombo: IRibbonComboBox;
    Items: IStringList;
Begin
    RPanel := Ribbon1.ActiveCategory.Panels.Item(0);
    RCombo := New RibbonComboBox.Create;
    RPanel.Elements.Add(RCombo);
    RCombo.AutoComplete := True;
    RCombo.ImageIndex := 0;
    RCombo.InnerWidth := 150;
    Items := RCombo.Items;
    Items.Add("One");
    Items.Add("Two");
    Items.Add("Three");
    RCombo.ResizeList := True;
    RCombo.SearchMode := True;
    RCombo.SearchPrompt := "Select number";
    RCombo.Style := ComboboxStyle.DropDown;
    RCombo.TextAlign := TextAlignment.Center;
End Sub Button1OnClick;

On clicking this button a combo-box is created in the ribbon panel. Basic parameters are defined for this combo-box.

See also:

IRibbonComboBox