IRibbonComboBox.AutoComplete

Fore Syntax

AutoComplete: Boolean;

Fore.NET Syntax

AutoComplete: Boolean;

Description

The AutoComplete property determines whether the autocomplete that is entered in the text component is used.

Comments

The property can be used 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.

The property is set to False by default.

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;
    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;

Clicking the button creates a combobox on the ribbon panel. Base parameters are defined for this combobox.

See also:

IRibbonComboBox