WebSearchField
From Xojo Documentation
Supported Platforms Project Types: Web Platforms: macOS, Windows, Linux |
Used for entering a value with which a search will be performed. This control is just a user interface control and does not do the searching itself. However, it does provide a recent searches popup menu of values that were recently entered by the user. To do a search, add code to the TextChanged event.
Events | |||||||||||||||||
|
Methods | ||||||||||||
|
Notes
The search string that the user entered is available in the TextChanged event. Use the Text property in this event to pass it to the engine that will conduct the search. Of course, there are many search engines that you can use.
This example is based on Safari's standard seach string that uses Google.
Recent Searches Menu
WebKit-based browsers may show a Recent Searches menu within this control. The searches on the Recent Searches menu are stored in a cookie and are specific to the name of the WebSearchField within an application. For example, if you have two WebSearchFields with the name "SearchField1" in the same application, the user will see the same Recent Searches menu for both. However, if the two WebSearchFields have different names or are in different applications, the menus will not contain the same data.
Sample Code
This code in the TextChanged event handler displays the search text in a MsgBox: