PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Handling an Action Bar by programming
  • Managing the views
  • Search in the Action Bar
  • WLanguage properties
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Handling an Action Bar by programming
Overview
An Action Bar can be handled by programming. 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 handle an Action Bar by programming.
Handling an Action Bar by programming
AndroidiPhone/iPad

Managing the views

The "Modification of displayed view" process is used to manage the change of view.
In this case, the variable corresponding to 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
Versions 21 and later
AndroidiPhone/iPad

Search in the Action Bar

To allow a search in the Action Bar:
  1. Check "Allow the search in the Action Bar". A new process is automatically associated to the Action Bar control: "Validating the search". This process is used to perform the search.
  2. If "Search history" is checked, the history of the last searches performed will be proposed to the user.
    iPhone/iPad Note: The option "With button to clear the history" is used to automatically manage the history reset.
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, "Customer to find")
  3. Display the processes associated with the Action Bar control. In the "Validating the search" process, enter the code used to perform the search and to display the result. In this code, you have the ability to find out the value entered by the user via ..SearchValue.
    For example:
    // Find a product.
    // The result is displayed in a looper.
    // The sought value corresponds to a parameter of the base query of the looper.
    QRY_Products.ParamName = ACTB_ActionBar..SearchValue
    LooperDisplay(LOOP_QRY_Products, taReExecuteQuery)
Notes:
  • 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 option "With button to clear the history" is selected, the history proposes a choice to clear the history at the end of the list of suggestions.
  • Two processes are automatically added when the search is enabled in the Action Bar:
    • Validating the search.
    • Modifying the search.
  • Canceling the search: To find out whether the search was canceled by the user, check the value of ..SearchValue in the "Validating the search" process. This value is set to "" (empty string) in case of cancelation.
Related Examples:
WM Managing Contacts Cross-platform examples (WINDEV Mobile): WM Managing Contacts
[ + ] This example presents the management of contacts for Android et iOS.
It is used o:
- list the contacts found on the phone
- call the contacts
- send SMSs to the contacts
- ...
WM Shopping Cross-platform examples (WINDEV Mobile): WM Shopping
[ + ] WM Shopping allows you to manage several purchase lists.
To add a product:
- Scan the bar code to add it directly
- or find a product that was added beforehand and add it!
- or add a product from your purchase history!
Then, you will have the ability to edit the quantity, the image... and to add notes as reminders!
New in version 21
AndroidiPhone/iPad

Search in the Action Bar

To allow a search in the Action Bar:
  1. Check "Allow the search in the Action Bar". A new process is automatically associated to the Action Bar control: "Validating the search". This process is used to perform the search.
  2. If "Search history" is checked, the history of the last searches performed will be proposed to the user.
    iPhone/iPad Note: The option "With button to clear the history" is used to automatically manage the history reset.
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, "Customer to find")
  3. Display the processes associated with the Action Bar control. In the "Validating the search" process, enter the code used to perform the search and to display the result. In this code, you have the ability to find out the value entered by the user via ..SearchValue.
    For example:
    // Find a product.
    // The result is displayed in a looper.
    // The sought value corresponds to a parameter of the base query of the looper.
    QRY_Products.ParamName = ACTB_ActionBar..SearchValue
    LooperDisplay(LOOP_QRY_Products, taReExecuteQuery)
Notes:
  • 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 option "With button to clear the history" is selected, the history proposes a choice to clear the history at the end of the list of suggestions.
  • Two processes are automatically added when the search is enabled in the Action Bar:
    • Validating the search.
    • Modifying the search.
  • Canceling the search: To find out whether the search was canceled by the user, check the value of ..SearchValue in the "Validating the search" process. This value is set to "" (empty string) in case of cancelation.
Related Examples:
WM Managing Contacts Cross-platform examples (WINDEV Mobile): WM Managing Contacts
[ + ] This example presents the management of contacts for Android et iOS.
It is used o:
- list the contacts found on the phone
- call the contacts
- send SMSs to the contacts
- ...
WM Shopping Cross-platform examples (WINDEV Mobile): WM Shopping
[ + ] WM Shopping allows you to manage several purchase lists.
To add a product:
- Scan the bar code to add it directly
- or find a product that was added beforehand and add it!
- or add a product from your purchase history!
Then, you will have the ability to edit the quantity, the image... and to add notes as reminders!
AndroidiPhone/iPad

Search in the Action Bar

To allow a search in the Action Bar:
  1. Check "Allow the search in the Action Bar". A new process is automatically associated to the Action Bar control: "Validating the search". This process is used to perform the search.
  2. If "Search history" is checked, the history of the last searches performed will be proposed to the user.
    iPhone/iPad Note: The option "With button to clear the history" is used to automatically manage the history reset.
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, "Customer to find")
  3. Display the processes associated with the Action Bar control. In the "Validating the search" process, enter the code used to perform the search and to display the result. In this code, you have the ability to find out the value entered by the user via ..SearchValue.
    For example:
    // Find a product.
    // The result is displayed in a looper.
    // The sought value corresponds to a parameter of the base query of the looper.
    QRY_Products.ParamName = ACTB_ActionBar..SearchValue
    LooperDisplay(LOOP_QRY_Products, taReExecuteQuery)
Notes:
  • 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 option "With button to clear the history" is selected, the history proposes a choice to clear the history at the end of the list of suggestions.
  • Two processes are automatically added when the search is enabled in the Action Bar:
    • Validating the search.
    • Modifying the search.
  • Canceling the search: To find out whether the search was canceled by the user, check the value of ..SearchValue in the "Validating the search" process. This value is set to "" (empty string) in case of cancelation.
Related Examples:
WM Managing Contacts Cross-platform examples (WINDEV Mobile): WM Managing Contacts
[ + ] This example presents the management of contacts for Android et iOS.
It is used o:
- list the contacts found on the phone
- call the contacts
- send SMSs to the contacts
- ...
WM Shopping Cross-platform examples (WINDEV Mobile): WM Shopping
[ + ] WM Shopping allows you to manage several purchase lists.
To add a product:
- Scan the bar code to add it directly
- or find a product that was added beforehand and add it!
- or add a product from your purchase history!
Then, you will have the ability to edit the quantity, the image... and to add notes as reminders!

WLanguage properties

To find out the entire list of WLanguage properties that can be used with an Action Bar, see Properties associated with the Action Bars.
Versions 19 and later
iPhone/iPad The properties of an Action Bar control cannot be modified by programming.
New in version 19
iPhone/iPad The properties of an Action Bar control cannot be modified by programming.
iPhone/iPad The properties of an Action Bar control cannot be modified by programming.
Minimum required version
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment