|
|
|
|
|
- Presentación
- Manipular un Action Bar mediante programación
- Gestionar las vistas
- Search in the Action Bar (system only)
- Propiedades WLanguage
Manipular un Action Bar mediante programación
Un Action Bar puede manipularse mediante programación. Para ello, utilice la variable que corresponde al Action Bar en el código. La variable del Action Bar corresponde al nombre del Action Bar. Esta página de ayuda explica cómo manipular un Action Bar mediante programación. Manipular un Action Bar mediante programación Gestionar las vistas El proceso "Modificación de la vista" permite cambiar la vista. En este caso, la variable del Action Bar corresponde al número de la vista seleccionada. Esto permite gestionar la ventana interna asociada a la vista: 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 "Permitir búsqueda en el Action Bar". A new event is automatically associated with the Action Bar control: "Search validation".. This event makes search possible.
- If the "Con historial de búsqueda" option is checked, the search history will be shown to the user.
Note: The "Con botón para borrar el historial" 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 "Con botón para borrar el historial" 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.
Propiedades WLanguage Para obtener la lista completa de las propiedades WLanguage que pueden utilizarse con un Action Bar, consulte Propiedades del Action Bar.
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|