ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Internal Window control
  • Overview
  • Principle
  • The principle for scrolling internal windows is straightforward
  • Implementation
  • Browsing internal windows: Browse programmatically
  • Browsing internal windows: automatic iteration on a data file or query
  • Advanced programming
  • WLanguage functions for handling the internal windows
  • Events run when scrolling the internal windows
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
In Windows applications, all operations are performed with the mouse or keyboard. Touch screens also allows performing certain operations directly with the fingertips.
In applications for mobile devices, several features are available via finger movements.
Internal windows allow scrolling by swiping:
  • AndroidiPhone/iPad In Android and iPhone/iPad applications: windows are scrolled through via a simple swipe.
  • Universal Windows 10 App In Universal Windows applications: windows are scrolled through via buttons (only the swipe through programming is available).
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 setup procedure of this extension is available at the following address:
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.
  • Through programming, a list of internal windows is associated with the "Internal window" control.
  • At runtime, the different internal windows of the list will be displayed when the user modifies the displayed element (via touch, mouse or specific buttons).
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 runtime, the data file (or the query) will be browsed and displayed in the internal window when the user modifies the displayed element (via touch, mouse or specific buttons).
Implementation

Browsing internal windows: Browse programmatically

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" tab, in the "Containers" group, click "Internal window".
  3. Display the description window of "Internal window" control. In the "UI" tab:
    • Check "Allow the change of content by swipe".
    • Specify:
      • the cache size. The size of the cache corresponds to the number of internal windows that will be stored in memory (3 by default).
        The cache cannot be used to load windows in advance. Windows are actually loaded when IWListPosition is used or when a window goes before or after the current window.
        The smaller this number is, the smaller the memory consumption will be. On the contrary, the windows will be loaded more frequently.
      • the orientation of the swipe: vertical or horizontal.
      • the animation to perform during the swipe (if necessary). Click "Configure the animation".
        The "Style" tab of the control appears positioned on the "Control animation" element. You can select the desired animation and configure its parameters via the "Parameters" button.
        If the option "Defined by the project" is selected, the animation performed will be the one configured in the project options. For more details, see Animation of controls.
  4. Through 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.
Remarks:
  • The windows must be added in the desired 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.
  • Universal Windows 10 App In your Universal Windows 10 App applications, in order for the user to scroll the internal windows, create the necessary button and call IWListPrevious and IWListNext.

Browsing internal windows: automatic iteration 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" tab, in the "Containers" group, click "Internal window".
  3. Display the description window of "Internal window" control.
    • In the "General" tab, associate the internal window that was just created with the "Internal window" control.
    • In the "UI" tab:
      • Check "Allow the change of content by swipe".
    • Specify:
      • the cache size. The size of the cache corresponds to the number of internal windows that will be stored in memory (3 by default).
        The cache cannot be used to load windows in advance.
        The smaller this number is, the smaller the memory consumption will be. On the contrary, the windows will be loaded more frequently.
      • the orientation of the swipe: vertical or horizontal.
      • the animation to perform during the swipe (if necessary). Click "Configure the animation".
        The "Style" tab of the control appears positioned on the "Control animation" element. You can select the desired animation and configure its parameters via the "Parameters" button.
        If the option "Defined by the project" is selected, the animation performed will be the one configured in the project options. For more details, see Animation of controls.
      • Check (if necessary) "Position on the current record when opening the internal window". This option is used to automatically position the data of the internal window on the current record. This option is taken into account only if the change of content is performed by swipe and if the content corresponds to a data source (file, query, etc.).
    • 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.
Universal Windows 10 App Remark: In your Universal Windows 10 App applications, in order for the user to scroll the internal windows, create the necessary button and call IWListPrevious and IWListNext.
Advanced programming

WLanguage functions for handling the internal windows

Several WLanguage functions can be used to manage the browses of internal windows:
ChangeSourceWindowDynamically changes the window displayed in an Internal Window control.
Scrolling internal windows: Modifies the window currently displayed. This modification is saved in the list of internal windows to scroll.
IWListAddAdds a new internal window to the list of internal windows browsed by an Internal Window control.
IWListCountReturns the number of internal windows currently found in the list of internal windows browsed by an Internal Window control.
IWListDeleteDeletes an internal window found in the list of internal windows browsed by an Internal Window control.
IWListDeleteAllDeletes all the internal windows from the list of internal windows browsed by an Internal Window control.
IWListDisplayRefreshes the display of an "Internal window" control with automatic iteration on a data file or query.
IWListInsertInserts a new internal window in the list of internal windows used by an Internal Window control.
IWListNextDisplays the next internal window in the list of internal windows browsed by an Internal Window control.
IWListPositionDisplays 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).
IWListPreviousDisplays the previous internal window in the list of internal windows browsed by an Internal Window control.
Remarks:
  • During an automatic iteration 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 through 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"
  • The SwipeEnabled property 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.
    Universal Windows 10 App This property is not available.
  • The VerticalSwipe property is used to get and change the swipe gesture orientation.
    Universal Windows 10 App This property is not available.

Events run when scrolling the internal windows

When implementing the scroll of internal windows, you have the ability to configure the cache size, 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 cache size are loaded. The following events are run for each one:
    • Global declarations of the internal window
    • Initializing the controls found in the internal window
    • Initializing the internal window
    • After loading the internal window.
  • When the user changes the contents of the internal window with a swipe gesture, the following events are run:
    • Selection by swipe.
    • Loading the next internal window (the events run are those of the above paragraph).
    • Unloading one of the internal windows (according to the cache size). In this case, the events "Before unloading the internal window" and "Closing" are run.
Remarks:
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 version required
  • Version 18
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help