PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Moves and swipes
  • Fast scroll
  • Moving rows
  • Action during a swipe
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
Overview
In a mobile application, several options can be handled with the fingers, by performing specific movements.
For the Looper controls, WINDEV Mobile proposes several options used to manage these moves and gestures. These options can be configured in the "Details" tab of the description window of the Looper control.
Moves and swipes
Android

Fast scroll

If the "Fast scroll" option is selected, the move in the Looper control is performed via a specific scrollbar box found on the side of the control.
If the "Alphabetical indexing on" option corresponds to an attribute of the Looper control, an alphabetical pager will allow the user to quickly scroll the rows whose attribute starts with the selected letter.
Caution: If this option is selected, the Looper control must be sorted in alphabetical order on the specified attribute.
Use conditions:
  • The fast scroll is available only for the memory Looper controls or the browsing Looper controls loaded in memory.
  • The fast scroll is not available for the horizontal Looper controls and for the multicolumn Looper controls.
Android

Moving rows

You can allow the user to move the rows found in a Looper control. In this case, you have the ability to choose a move:
  • via a grip on the left,
  • via a grip on the right.
To perform a move by gesture, all you have to do is remain pressed on the element and move this element.
If the user is allowed to move rows, new processes are associated with the Looper control:
Beginning of source Drag/DropThis process is run at the beginning of Drag/Drop for the element. This process is used to run different tests for example. If this process returns False, the move is not performed.
Drop in target Drag/DropThis process is run at the end of Drag/Drop for the element. If this process returns False, the move is not performed.
Use conditions:
  • Moving rows is available for the memory Looper controls and for the browsing Looper controls loaded in memory.
  • Moving rows is not available for the horizontal Looper controls and for the multicolumn Looper controls.

Action during a swipe

On the Looper controls, an action can be performed during an horizontal swipe of a row (drag the element from right to left or from left to right).
You have the ability to perform:
  • an automatic deletion.
  • Android an action by programming.
  • Versions 21 and later
    AndroidiPhone/iPad a customizable swipe.
    New in version 21
    AndroidiPhone/iPad a customizable swipe.
    AndroidiPhone/iPad a customizable swipe.
Automatic deletion
If the "Automatic deletion" option is selected, new processes are associated with the Looper control:
Before automatically deleting a row by swipeThis process is run before the automatic deletion of the record displayed in the row. This process is used to run different tests for example. If this process returns False, the deletion is not performed.
After automatic deletion of a row by swipeThis process is run after the effective deletion of the record. This process is used to redisplay the data for example.
Android Swiping a row
This process is run BEFORE the "Before deleting a row" process. If this process returns False, the "Before automatically deleting a row" process is not run and the record is not deleted.
Note: Only the record found in the file linked to the row of the Looper control is deleted. The linked records found in the other data files are not automatically deleted.
Android Action by programming
If the "Action by programming" option is selected, a new process is associated with the Looper control:
Swiping a rowThis process is run when the row is swiped by the user. This process is used to program the requested action.
Use conditions:
  • The action during a swipe is available for the memory Looper controls and for the browsing Looper controls loaded in memory.
  • The action during a swipe is not available for the horizontal Looper controls and for the multicolumn Looper controls.
  • The action during a swipe is available in the simulator.
Versions 21 and later
AndroidiPhone/iPad Customizable swipe
This option is used to display a specific internal window during the swipe. This internal window proposes the actions to perform after the swipe. An example of internal window is supplied in standard but you also have the ability to use an internal window of project.
The parameters of the custom swipe are as follows:
  • Same actions for the left and right swipe/Different actions according to the orientation of the swipe: These options are used to define whether the swipe is managed the same way regardless of its direction. You can use:
    • the same internal window for the swipe to the right and to the left.
    • a different internal window for the swipe to the right and to the left.
      Note: If an orientation is not associated with an internal window, the swipe cannot be performed in this direction.
  • Internal window to use: You can use:
    • the internal window supplied by default. To import this window into your project:
      1. On the "Project" pane, in the "Project" group, expand "Import" and select "WINDEV Mobile elements and their dependencies".
      2. Select the "\Programs\Datas\Preset windows\AAF" directory.
      3. Select the "IW_ForSwipeLoop" window and validate the import of the window. The window is displayed in the editor. Save this window.
    • a specific internal window. In this case, the global declaration code of the window must respect the following prototype:
      PROCEDURE <Procedure Name>(<Looper Name>, <Subscript of Swiped Row>")

      where:
      • <Looper Name> represents the name of the Looper control on which the swipe is performed.
      • <Subscript of Swiped Row> represents the number of the swiped row.
  • Respect the width of the internal window: Used to specify whether the internal window keeps its edit width (option checked) or whether the width of the internal window occupies the entire width of the Looper control (default option).
  • Run the swipe process:
    • Immediately: The "Row swipe" process of the Looper control is run when displaying the internal window (when the internal window covered the row of the Looper control).
    • During the next scroll of the looper: The "Row swipe" process of the Looper control is run during the next action on the Looper control. This option is recommended if the internal window contains buttons used to perform specific processes. Therefore, the "Row swipe" process will be run when the user is handling the Looper control (the internal window will be closed).
If the "Customizable swipe" option is selected, a new process is associated with the Looper control:
Swiping a rowThis process is run when the row is swiped by the user. The conditions for running this process depend on the "Run the swipe process" option in the setting of the customizable swipe.
Notes:
  • The internal swipe window can be closed by LooperCancelSwipe. The Cancel button found in the internal window supplied in standard is using this function.
  • The internal window is loaded (execution of declaration and initialization codes) as soon as the swipe is started.
  • The internal window is unloaded (execution of closing code) when the internal window disappears.
  • iPhone/iPad ..SwipeEnabled is used to temporarily disable the swipe on a row found in the Looper control.
New in version 21
AndroidiPhone/iPad Customizable swipe
This option is used to display a specific internal window during the swipe. This internal window proposes the actions to perform after the swipe. An example of internal window is supplied in standard but you also have the ability to use an internal window of project.
The parameters of the custom swipe are as follows:
  • Same actions for the left and right swipe/Different actions according to the orientation of the swipe: These options are used to define whether the swipe is managed the same way regardless of its direction. You can use:
    • the same internal window for the swipe to the right and to the left.
    • a different internal window for the swipe to the right and to the left.
      Note: If an orientation is not associated with an internal window, the swipe cannot be performed in this direction.
  • Internal window to use: You can use:
    • the internal window supplied by default. To import this window into your project:
      1. On the "Project" pane, in the "Project" group, expand "Import" and select "WINDEV Mobile elements and their dependencies".
      2. Select the "\Programs\Datas\Preset windows\AAF" directory.
      3. Select the "IW_ForSwipeLoop" window and validate the import of the window. The window is displayed in the editor. Save this window.
    • a specific internal window. In this case, the global declaration code of the window must respect the following prototype:
      PROCEDURE <Procedure Name>(<Looper Name>, <Subscript of Swiped Row>")

      where:
      • <Looper Name> represents the name of the Looper control on which the swipe is performed.
      • <Subscript of Swiped Row> represents the number of the swiped row.
  • Respect the width of the internal window: Used to specify whether the internal window keeps its edit width (option checked) or whether the width of the internal window occupies the entire width of the Looper control (default option).
  • Run the swipe process:
    • Immediately: The "Row swipe" process of the Looper control is run when displaying the internal window (when the internal window covered the row of the Looper control).
    • During the next scroll of the looper: The "Row swipe" process of the Looper control is run during the next action on the Looper control. This option is recommended if the internal window contains buttons used to perform specific processes. Therefore, the "Row swipe" process will be run when the user is handling the Looper control (the internal window will be closed).
If the "Customizable swipe" option is selected, a new process is associated with the Looper control:
Swiping a rowThis process is run when the row is swiped by the user. The conditions for running this process depend on the "Run the swipe process" option in the setting of the customizable swipe.
Notes:
  • The internal swipe window can be closed by LooperCancelSwipe. The Cancel button found in the internal window supplied in standard is using this function.
  • The internal window is loaded (execution of declaration and initialization codes) as soon as the swipe is started.
  • The internal window is unloaded (execution of closing code) when the internal window disappears.
  • iPhone/iPad ..SwipeEnabled is used to temporarily disable the swipe on a row found in the Looper control.
AndroidiPhone/iPad Customizable swipe
This option is used to display a specific internal window during the swipe. This internal window proposes the actions to perform after the swipe. An example of internal window is supplied in standard but you also have the ability to use an internal window of project.
The parameters of the custom swipe are as follows:
  • Same actions for the left and right swipe/Different actions according to the orientation of the swipe: These options are used to define whether the swipe is managed the same way regardless of its direction. You can use:
    • the same internal window for the swipe to the right and to the left.
    • a different internal window for the swipe to the right and to the left.
      Note: If an orientation is not associated with an internal window, the swipe cannot be performed in this direction.
  • Internal window to use: You can use:
    • the internal window supplied by default. To import this window into your project:
      1. On the "Project" pane, in the "Project" group, expand "Import" and select "WINDEV Mobile elements and their dependencies".
      2. Select the "\Programs\Datas\Preset windows\AAF" directory.
      3. Select the "IW_ForSwipeLoop" window and validate the import of the window. The window is displayed in the editor. Save this window.
    • a specific internal window. In this case, the global declaration code of the window must respect the following prototype:
      PROCEDURE <Procedure Name>(<Looper Name>, <Subscript of Swiped Row>")

      where:
      • <Looper Name> represents the name of the Looper control on which the swipe is performed.
      • <Subscript of Swiped Row> represents the number of the swiped row.
  • Respect the width of the internal window: Used to specify whether the internal window keeps its edit width (option checked) or whether the width of the internal window occupies the entire width of the Looper control (default option).
  • Run the swipe process:
    • Immediately: The "Row swipe" process of the Looper control is run when displaying the internal window (when the internal window covered the row of the Looper control).
    • During the next scroll of the looper: The "Row swipe" process of the Looper control is run during the next action on the Looper control. This option is recommended if the internal window contains buttons used to perform specific processes. Therefore, the "Row swipe" process will be run when the user is handling the Looper control (the internal window will be closed).
If the "Customizable swipe" option is selected, a new process is associated with the Looper control:
Swiping a rowThis process is run when the row is swiped by the user. The conditions for running this process depend on the "Run the swipe process" option in the setting of the customizable swipe.
Notes:
  • The internal swipe window can be closed by LooperCancelSwipe. The Cancel button found in the internal window supplied in standard is using this function.
  • The internal window is loaded (execution of declaration and initialization codes) as soon as the swipe is started.
  • The internal window is unloaded (execution of closing code) when the internal window disappears.
  • iPhone/iPad ..SwipeEnabled is used to temporarily disable the swipe on a row found in the Looper control.
Related Examples:
WM ToDo List Cross-platform examples (WINDEV Mobile): WM ToDo List
[ + ] This example is a manager of To-Do Lists.
The project is using the gestures in the loopers in order to move and delete the lists and tasks.
The data is stored in a HFSQL database.
Minimum required version
  • Version 18
Comments
Click [Add] to post a comment