|
|
|
|
|
- Overview
- Manipulating Action Bars programmatically
- Managing the views
- Search in the Action Bar (system only)
- WLanguage properties
Manipulating Action Bars programmatically
Action Bars can be manipulated programmatically. To do so, use the variable corresponding to the Action Bar in the code. The variable of the Action Bar corresponds to the name of the Action Bar. This help page explains how to programmatically manipulate Action Bars. Manipulating Action Bars programmatically Managing the views The "Change view" process is used change the view. In this case, the variable of the Action Bar corresponds to the number of the selected view. This allows you to manage the internal window associated with the view: SWITCH ACTB_ActionBar CASE 1 ChangeSourceWindow(ABZ_Dish, IW_ListDishes, "Starters", "") CASE 2 ChangeSourceWindow(ABZ_Dish, IW_ListDishes, "Dishes", "") CASE 3 ChangeSourceWindow(ABZ_Dish, IW_ListDishes, "Desserts", "") END
Search in the Action Bar (system only) To allow a search in the Action Bar: - Check "Allow the search in the Action Bar". A new event is automatically associated with the Action Bar control: "Search validation".. This event makes search possible.
- If the "With search history" option is checked, the search history will be shown to the user.
Note: The "With button to clear the history" option is used to automatically manage history blanking..
To implement the search, perform the following operations for example: - Create a search button in the Action Bar (a "Magnifier" button for example).
- In the code of this option, use ActionBarSearchVisible to display the search edit control. For example:
ActionBarSearchVisible(True, "Client à rechercher")
- Open the WLanguage events associated with the Action Bar control. In the "Validating the search" event, enter the code used to perform the search and display the result. In this code, you have the ability to find out the value entered by the user via SearchValue.
For example:
REQ_Produits.ParamNom = ACTB_ActionBar.ValeurRecherche
LooperDisplay(ZR_REQ_Produits, taReExecuteQuery)
Remarks: - If the history of searches is enabled:
- when the edit control is empty, the 10 last searches are proposed.
- when the edit is started, 10 suggestions are displayed according to what was already typed.
- You have the ability to clear the history with ActionBarDeleteSearchHistory.
- If the "With button to clear the history" option is selected, an option to clear the history will appear at the end of the search results.
- Two WLanguage events are automatically added when search is enabled in the Action Bar:
- Validating the search.
- Modifying the search.
- Search cancellation: To find out whether the user has cancelled the search, test the value of the SearchValue property in the "Search validation" event.. This value is set to "" (empty string) in case of cancellation.
WLanguage properties For a complete list of WLanguage properties that can be used with an Action Bar, see Action Bar properties.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|