Difference between revisions of "GUISearchField"

From Virtual World Web Wiki
Jump to: navigation, search
(Documentation for the GUISearchField class)
(Documentation for the GUISearchField class)
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 8: Line 6:
 
===Properties===
 
===Properties===
 
:{{CSharp|GUIButton ClearButton {get;} }}
 
:{{CSharp|GUIButton ClearButton {get;} }}
::
 
::Button displayed to the right of the search field for clearing the text
 
  
 
:{{CSharp|bool DisplayPreviousResults {get; set;} }}
 
:{{CSharp|bool DisplayPreviousResults {get; set;} }}
::
 
::Enables prevous search menu
 
  
 
:{{CSharp|int MaxStoredResults {get; set;} }}
 
:{{CSharp|int MaxStoredResults {get; set;} }}
::
 
::The maximum amount of previous searches to store
 
::Note: Only manually commited searches are added
 
  
 
:{{CSharp|int MinimumSearchLength {get; set;} }}
 
:{{CSharp|int MinimumSearchLength {get; set;} }}
::
 
::Minimum number of characters before we trigger a search
 
  
 
:{{CSharp|string Placeholder {get; set;} }}
 
:{{CSharp|string Placeholder {get; set;} }}
::
 
::A value that will be displayed when there is no search value
 
::And the search control is not in focus
 
  
 
:{{CSharp|GUILabel PlaceholderLabel {get;} }}
 
:{{CSharp|GUILabel PlaceholderLabel {get;} }}
::
 
::The placeholder label displayed when there is no search and the text field is not focused
 
  
 
:{{CSharp|int RecentSearchCount {get;} }}
 
:{{CSharp|int RecentSearchCount {get;} }}
::
 
::Returns how many entries there are in the recent searches list.
 
  
 
:{{CSharp|float ResultsDelay {get; set;} }}
 
:{{CSharp|float ResultsDelay {get; set;} }}
::
 
::A delay between typing and when the search starts (In seconds)
 
  
 
:{{CSharp|GUIImageBox SearchIcon {get;} }}
 
:{{CSharp|GUIImageBox SearchIcon {get;} }}
::
 
::Icon displayed to the left of the search field
 
  
 
:{{CSharp|bool ShowClearButton {get; set;} }}
 
:{{CSharp|bool ShowClearButton {get; set;} }}
::
 
::Allows the clear button to display if there is a search value
 
  
 
:{{CSharp|bool SubmitOnEnter {get; set;} }}
 
:{{CSharp|bool SubmitOnEnter {get; set;} }}
::
 
::Should submit automatically fire when the user presses Enter?
 
  
 
:{{CSharp|string Value {get; set;} }}
 
:{{CSharp|string Value {get; set;} }}
::
 
::The value that will be searched upon commit
 
  
 
===Events===
 
===Events===
 
:{{CSharp|OnSearchChanged()}}
 
:{{CSharp|OnSearchChanged()}}
::
 
::Event fired when a search is submitted
 
  
 
:{{CSharp|OnTextChanged()}}
 
:{{CSharp|OnTextChanged()}}
::
 
::Event fired whenever the text in the search field changes
 
  
 
===Methods===
 
===Methods===
 
:{{CSharp|void AddRecent(string recent)}}
 
:{{CSharp|void AddRecent(string recent)}}
::
 
::Adds an item to the recent searches list
 
  
 
:{{CSharp|void ClearRecents()}}
 
:{{CSharp|void ClearRecents()}}
::
 
::Clears all entries from the recent searches list
 
  
 
:{{CSharp|int FindRecent(string recent)}}
 
:{{CSharp|int FindRecent(string recent)}}
::
 
::Returns the index of the recent search entry matching
 
  
 
:{{CSharp|string GetRecent(int index)}}
 
:{{CSharp|string GetRecent(int index)}}
::
 
::Returns the recent search at a particular index
 
  
 
:{{CSharp|void RemoveRecent(string recent)}}
 
:{{CSharp|void RemoveRecent(string recent)}}
::
 
::Removes an entry for the recent searches list
 
  
 
:{{CSharp|void SetFocus()}}
 
:{{CSharp|void SetFocus()}}
::
 
::Brings focus to this component
 
  
 
__NOTOC____NOEDITSECTION__
 
__NOTOC____NOEDITSECTION__

Revision as of 12:49, 26 May 2017

Remarks [edit]

Properties

GUIButton ClearButton {get;}
bool DisplayPreviousResults {get; set;}
int MaxStoredResults {get; set;}
int MinimumSearchLength {get; set;}
string Placeholder {get; set;}
GUILabel PlaceholderLabel {get;}
int RecentSearchCount {get;}
float ResultsDelay {get; set;}
GUIImageBox SearchIcon {get;}
bool ShowClearButton {get; set;}
bool SubmitOnEnter {get; set;}
string Value {get; set;}

Events

OnSearchChanged()
OnTextChanged()

Methods

void AddRecent(string recent)
void ClearRecents()
int FindRecent(string recent)
string GetRecent(int index)
void RemoveRecent(string recent)
void SetFocus()