Web Search Field

From Xojo Documentation

Revision as of 15:04, 25 August 2020 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A Search Field is used for entering values that relate to searching. It operates similarly to a Text Field, but has a different look and extra features such a list of recently entered values and cue text.

A Search Field does not do any searching; it is used to get the text for searching.

Use the Set Default Value feature to specify the default text.

The commonly used events and properties are listed below. Refer to WebSearchField in the Language Reference for the complete list.



Called when a key has been pressed while the field has focus. The Details parameters tells you which key was pressed. Remember that events such as this call back to the server to process the code. Due to latency between the browser and the server you do not want to have time consuming code in this event handler.


Called when the user both changes the value and then either presses the return/enter keys, presses the search button that is built-in to the WebSearchField, cancels the entry by clicking the Cancel Entry button (X) that appears when the user types in the WebSearchField or by causing the WebSearchField to lose focus.



Gets or sets the hint (prompt text) that is displayed within the control.


Contains the text displayed in the text field.


To get the text the user typed in the Search Field, use the Value property:

Var search As String
search = CustomerSearch.Value

See Also

WebSearchField class; UserGuide:Web UI topic