Table of Contents

Interface IAutocomplete

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

Renders an overlay on another view at a given point that allows selecting from a range of 'autocomplete' options.

public interface IAutocomplete

Properties

AllSuggestions

The full set of all strings that can be suggested.

CloseKey

The key that the user can press to close the currently popped autocomplete menu

ColorScheme

The colors to use to render the overlay. Accessing this property before the Application has been initialized will cause an error

HostControl

The host control that will use autocomplete.

MaxHeight

The maximum number of visible rows in the autocomplete dropdown to render

MaxWidth

The maximum width of the autocomplete dropdown

PopupInsideContainer

Gets or sets where the popup will be displayed.

Reopen

The key that the user can press to reopen the currently popped autocomplete menu

SelectedIdx

The currently selected index into Suggestions that the user has highlighted

SelectionKey

The key that the user must press to accept the currently selected autocomplete suggestion

Suggestions

The strings that form the current list of suggestions to render based on what the user has typed so far.

Visible

True if the autocomplete should be considered open and visible

Methods

ClearSuggestions()

Clears Suggestions

GenerateSuggestions(int)

Populates Suggestions with all strings in AllSuggestions that match with the current cursor position/text in the HostControl.

MouseEvent(MouseEvent, bool)

Handle mouse events before HostControl e.g. to make mouse events like report/click apply to the autocomplete control instead of changing the cursor position in the underlying text view.

ProcessKey(KeyEvent)

Handle key events before HostControl e.g. to make key events like up/down apply to the autocomplete control instead of changing the cursor position in the underlying text view.

RenderOverlay(Point)

Renders the autocomplete dialog inside the given HostControl at the given point.