Difference between revisions of "GUISearchField"
From Virtual World Web Wiki
(Documentation for the GUISearchField class) |
(Documentation for the GUISearchField class) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | A text field with search functionality | ||
+ | |||
*'''Inherits class: [[GUISelectableComponent]]''' | *'''Inherits class: [[GUISelectableComponent]]''' | ||
* This is a JavaScript visible object | * This is a JavaScript visible object | ||
Line 21: | Line 23: | ||
:: | :: | ||
::Minimum number of characters before we trigger a search | ::Minimum number of characters before we trigger a search | ||
− | |||
− | |||
− | |||
− | |||
− | |||
:{{CSharp|GUILabel PlaceholderLabel {get;} }} | :{{CSharp|GUILabel PlaceholderLabel {get;} }} |
Latest revision as of 18:42, 5 March 2018
A text field with search functionality
- Inherits class: GUISelectableComponent
- This is a JavaScript visible object
Remarks [edit]
Properties
- GUIButton ClearButton {get;}
- Button displayed to the right of the search field for clearing the text
- bool DisplayPreviousResults {get; set;}
- Enables prevous search menu
- int MaxStoredResults {get; set;}
- The maximum amount of previous searches to store
- Note: Only manually commited searches are added
- int MinimumSearchLength {get; set;}
- Minimum number of characters before we trigger a search
- GUILabel PlaceholderLabel {get;}
- The placeholder label displayed when there is no search and the text field is not focused
- int RecentSearchCount {get;}
- Returns how many entries there are in the recent searches list.
- float ResultsDelay {get; set;}
- A delay between typing and when the search starts (In seconds)
- GUIImageBox SearchIcon {get;}
- Icon displayed to the left of the search field
- bool ShowClearButton {get; set;}
- Allows the clear button to display if there is a search value
- bool SubmitOnEnter {get; set;}
- Should submit automatically fire when the user presses Enter?
- string Value {get; set;}
- The value that will be searched upon commit
Events
- OnSearchChanged()
- Event fired when a search is submitted
- OnTextChanged()
- Event fired whenever the text in the search field changes
Methods
- void AddRecent(string recent)
- Adds an item to the recent searches list
- void ClearRecents()
- Clears all entries from the recent searches list
- int FindRecent(string recent)
- Returns the index of the recent search entry matching
- string GetRecent(int index)
- Returns the recent search at a particular index
- void RemoveRecent(string recent)
- Removes an entry for the recent searches list
- void SetFocus()
- Brings focus to this component