Table of Contents

Interface ICollectionNavigator

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

Navigates a collection of items using keystrokes. The keystrokes are used to build a search string. The SearchString is used to find the next item in the collection that matches the search string when GetNextMatchingItem(int, char) is called.

If the user types keystrokes that can't be found in the collection, the search string is cleared and the next item is found that starts with the last keystroke.

If the user pauses keystrokes for a short time (see TypingDelay), the search string is cleared.

public interface ICollectionNavigator

Properties

Matcher

Class responsible for deciding whether given entries in the collection match the search term the user is typing.

SearchString

Gets the current search string. This includes the set of keystrokes that have been pressed since the last unsuccessful match or after TypingDelay) milliseconds. Useful for debugging.

TypingDelay

Gets or sets the number of milliseconds to delay before clearing the search string. The delay is reset on each call to GetNextMatchingItem(int, char). The default is 500ms.

Methods

GetNextMatchingItem(int, char)

Gets the index of the next item in the collection that matches the current SearchString plus the provided character (typically from a key press).

Events

SearchStringChanged

This event is invoked when SearchString changes. Useful for debugging.