PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • Overview
  • Principle
  • The principle for scrolling internal windows is straightforward
  • Implementation
  • Browsing internal windows: Programmed browse
  • Browsing internal windows: automatic browse on a data file or query
  • Advanced programming
  • WLanguage functions for handling the internal windows
  • Processes run when scrolling the internal windows
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 the Windows applications, all the operations are performed via the mouse or the keyboard. Touch screens also allows operations to be performed using your hands directly.
In the applications for mobile devices, several features are available via finger movements.
The internal windows propose a scroll by swipe:
  • AndroidiPhone/iPad In the Android and iPhone/iPad applications: a simple swipe allows you to scroll the windows .
  • Versions 19 and later
    WINDEVWindows In the Windows applications: scrolling through the windows is performed via the mouse.
    New in version 19
    WINDEVWindows In the Windows applications: scrolling through the windows is performed via the mouse.
    WINDEVWindows In the Windows applications: scrolling through the windows is performed via the mouse.
Android Use conditions:
To scroll the internal windows in Android, the "Android Support Library V4" extension is required on the development computer, when generating the Android application. The procedure for installing this extension is available from:
http://developer.android.com/tools/extras/support-library.html#Downloading
Principle

The principle for scrolling internal windows is straightforward

  • An "Internal window" control is created in the editor. This "Internal window" control supports the swipe.
  • By programming, a list of internal windows is associated with the "Internal window" control.
  • At run time, the different internal windows of the list will be displayed when the user moves his fingers (or mouse) to scroll through the window.
You also have the ability to create a scroll of internal windows based on a data file or on a query. In this case, the principle is as follows:
  • An internal window is created. The controls of this window are associated with a data file or with a query.
  • An "Internal window" control is created in the editor. This "Internal window" control supports the swipe and it is associated with the data file or with the query of the internal window.
  • At run time, the file (or the query) will be browsed and displayed in the internal windows when the user moves his fingers (or the mouse) to scroll the window.
Implementation

Browsing internal windows: Programmed browse

To implement a browse of internal windows:
  1. Create the internal windows that will be displayed during the browse. These internal windows can accept parameters during their opening if necessary.
  2. Create an "Internal window" control in your window: on the "Creation" pane, in the "Containers" group, click "Internal window".
  3. Display the description window of the "Internal window" control. In the "GUI" tab:
    • Check "Allow the change of content by swipe".
    • Specify the size of the cache. The size of the cache corresponds to the number of internal windows that will be stored in memory (3 by default). The smaller this number is, the smaller the memory consumption will be. On the contrary, the windows will be loaded more frequently.
  4. By programming, build the list of internal windows that will be displayed in the "Internal window" control. To do so, use IWListAdd as many times as necessary.
Notes:
  • The windows must be added in the requested browse order.
  • The parameters that must be passed to the added internal windows can be specified in IWListAdd.
  • The same internal window can be added several times with different parameters.

Browsing internal windows: automatic browse on a data file or query

To implement a browse of internal windows based on a data file or on a query:
  1. Create the internal window that must display the different records. The controls of this internal window must be linked to the items of the file or query being read.
  2. Create an "Internal window" control in your window: on the "Creation" pane, in the "Containers" group, click "Internal window".
  3. Display the description window of the "Internal window" control.
    • In the "General" tab, associate the internal window that was just created with the "Internal window" control.
    • In the "GUI" tab:
      • Check "Allow the change of content by swipe".
      • Specify the size of the cache. The size of the cache corresponds to the number of internal windows that will be stored in memory (3 by default). The smaller this number is, the smaller the memory consumption will be. On the contrary, the windows will be loaded more frequently.
    • In the "Content" tab:
      • Select the mode for filling the internal window: "File/Query".
      • Select the source used: file, query or embedded query.
      • Select the search item.
Advanced programming

WLanguage functions for handling the internal windows

Several WLanguage functions can be used to manage the browses of internal windows:
Versions 10 and later
ChangeSourceWindow
New in version 10
ChangeSourceWindow
ChangeSourceWindow
Dynamically changes the window displayed in an Internal Window control Case of scrolling internal windows: Modifies the window currently displayed. This modification is saved in the list of internal windows to scroll
Versions 18 and later
IWListAdd
New in version 18
IWListAdd
IWListAdd
Adds a new internal window to the list of internal windows browsed by an Internal Window control.
Versions 18 and later
IWListCount
New in version 18
IWListCount
IWListCount
Returns the number of internal windows currently found in the list of internal windows browsed by an Internal Window control.
Versions 18 and later
IWListDelete
New in version 18
IWListDelete
IWListDelete
Deletes an internal window found in the list of internal windows browsed by an Internal Window control.
Versions 18 and later
IWListDeleteAll
New in version 18
IWListDeleteAll
IWListDeleteAll
Deletes all the internal windows from the list of internal windows browsed by an Internal Window control
Versions 18 and later
IWListDisplay
New in version 18
IWListDisplay
IWListDisplay
Refreshes the display of an "Internal window" control with automatic browse on a data file or query
Versions 19 and later
IWListInsert
New in version 19
IWListInsert
IWListInsert
Inserts a new internal window in the list of internal windows used by an Internal Window control.
Versions 18 and later
IWListNext
New in version 18
IWListNext
IWListNext
Displays the next internal window in the list of internal windows browsed by an Internal Window control.
Versions 18 and later
IWListPosition
New in version 18
IWListPosition
IWListPosition
Displays the internal window corresponding to the specified position (in the list of internal windows browsed by an Internal Window control) or returns the position of the internal window currently displayed (in the list of internal windows browsed by an Internal Window control).
Versions 18 and later
IWListPrevious
New in version 18
IWListPrevious
IWListPrevious
Displays the previous internal window in the list of internal windows browsed by an Internal Window control.
Notes:
  • During an automatic browse performed on a data file or on a query, ChangeSourceWindow, IWListAdd, IWListInsert, IWListDelete, IWListDeleteAll cannot be used.
  • ChangeSourceWindow is used to modify the window currently displayed. This modification is saved in the list of internal windows to scroll.
  • Only the controls found in the internal window currently displayed can be accessed by programming. For example, the following code is used to change the caption of the button found in the internal window currently displayed:
    MyInternalWindowControl.BTN_Button = "New caption"
  • Versions 21 and later
    ..SwipeEnabled is used to enable or disable the browse of internal windows with the finger. This allows you to temporarily disable the swipe in order to perform a specific operation.
    New in version 21
    ..SwipeEnabled is used to enable or disable the browse of internal windows with the finger. This allows you to temporarily disable the swipe in order to perform a specific operation.
    ..SwipeEnabled is used to enable or disable the browse of internal windows with the finger. This allows you to temporarily disable the swipe in order to perform a specific operation.

Processes run when scrolling the internal windows

When implementing the scroll of internal windows, you have the ability to configure the size of the cache, which means the number of internal windows loaded in memory.
When running a window used to scroll a list of internal windows:
  • The internal windows found in the list and corresponding to the number specified in the size of the cache are loaded. The following processes are run for each one:
    • Declaring the global variables of the internal window
    • Initializing the controls found in the internal window
    • Initializing the internal window
    • After loading the internal window.
  • The following processes are run when the user changes the content of the internal window by swipe:
    • Selection by swipe.
    • Loading the next internal window (the processes run are the ones of the above paragraph).
    • Unloading one of the internal windows (according to the size of the cache). In this case, the "Before unloading the internal window" process and the "Closing" process are run.
Notes:
Related Examples:
WM CRM Cross-platform examples (WINDEV Mobile): WM CRM
[ + ] WM CRM is a multi-platform project for Android and iOS.
It explains how to develop a CRM application intended to the Android and iPad tablets.
Minimum required version
  • Version 18
This page is also available for…
Comments
Click [Add] to post a comment