AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Controles: tipos disponibles / Control Action Bar
  • Presentación
  • Manipular un Action Bar mediante programación
  • Gestionar las vistas
  • Search in the Action Bar (system only)
  • Propiedades WLanguage
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Manipular un Action Bar mediante programación
Presentació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:
  1. 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.
  2. If the "Con historial de búsqueda" option is checked, the search history will be shown to the user.
    iPhone/iPad 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:
  1. Create a search button in the Action Bar (a "Magnifier" button for example).
  2. In the code of this option, use ActionBarSearchVisible to display the search edit control. For example:
    ActionBarSearchVisible(True, "Client à rechercher")
  3. 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:
    // Recherche d'un produit. 
    // Le résultat est affiché dans un champ Zone répétée. 
    // La valeur recherchée correspond à un paramètre de la requête de base du champ Zone répétée. 
    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.
  • iPhone/iPad 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.
iPhone/iPad Las propiedades de un control Action Bar no pueden modificarse mediante programación.
Versión mínima requerida
  • Versión 17
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 18/09/2024

Señalar un error o enviar una sugerencia | Ayuda local