PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Overview
  • Selection mode ("UI" tab of the description window)
  • Selection modes
  • Display mode ("Details" tab of the description window)
  • The different available modes
  • Standard vertical mode or column gallery mode: Column anchoring
  • Resizing the cells of a Looper control
  • Input parameters and scrollbar display
  • Input parameters
  • Scrollbar
  • Move and gesture
  • Search control
  • Populate Looper controls programmatically
  • Variable row content
  • Implementation
  • Characteristics of 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
To view the characteristics of the control, select "Description" in the context menu. In a window, the attributes not being proposed by default, only the characteristics of the Looper control will be displayed.
The main control characteristics are grouped in the following tabs:
  • The "General" tab displays the list of controls found in the Looper control.
  • The "UI" tab is used to select the initial status, the selection mode, the context menu, ...
    Windows This tab includes options for Looper controls populated programmatically (displaying a progress bar or window, etc.). For more details, see Populate Looper controls programmatically.
  • The "Details" tab is used to select the display mode of control, the input parameters and the scrollbar parameters.
  • The "Content" tab is used to define the mode for filling the control and the breaks.
    This tab is also used to manage the display of a different content in each row (via internal windows). For more details, see Different content in each row.
  • The "Style" tab allows you to define the style of the different control elements.
Selection mode ("UI" tab of the description window)

Selection modes

The following selection modes are available in a Looper control:
  • No selection: The selection bar is not displayed on the selected row. However, the "Select a row" event in run when the row is selected.
  • Single selection: The selection bar is displayed on the selected row. The code in the "Select a row" event is run.
  • Multi-selection: The selection bar is displayed on the selected rows. To select several rows, hold the Shift or Ctrl key down. The "Select a row" event is run whenever a row is selected.
  • WINDEV Multiple selection via a single click: This option is used to perform a multi-selection with the mouse. If this option is selected, all you have to do is click a row in order for this row to be added to the multi-selection or removed from the multi-selection.
  • AndroidiPhone/iPad Android/iOS selection mode: This option hides the selection bar after the selection. This allows you to get the standard operating mode on these platforms: the bar appears only when the row is clicked. Then, the row selection code is executed.
Display mode ("Details" tab of the description window)

The different available modes

Several display modes are available:
  • Standard (grid): Display mode of standard Looper controls. In this case, the Looper control can be horizontal or vertical.
  • Gallery in rows: Display mode corresponding to the Gallery control in rows. For more details, see 'Image gallery' Looper control.
  • Gallery in columns: Display mode corresponding to the Gallery control in columns. For more details, see 'Image gallery' Looper control.
These modes can be selected in the "Details" tab of the Looper control description window.

Standard vertical mode or column gallery mode: Column anchoring

The available options are:
  • Variable column width: If the width of the looper allows for an additional column, the number of columns does not change. Only the width of columns is modified.
  • Variable width and number of columns: If the width of the looper control allows for an additional column, it will be added. Before adding the column, the rows are stretched horizontally.
  • Variable number of columns (left): If the width of the looper control allows for an additional column, it will be added. Before adding the column, the columns are aligned on the left and an empty area may appear on the right.
  • Variable number of columns (columns): If the width of the looper control allows for an additional column, it will be added. Before adding a column, the columns are centered in the control and an empty area may appear on either side of the centered columns.
  • Fixed width and number of columns (left): The number of columns and the width of the columns are not changed. Columns are aligned to the left.
  • Fixed width and number of columns (centered): The number of columns and the width of the columns are not changed. The columns are centered.
Universal Windows 10 App You cannot select a specific display mode: the Looper controls display a single column.
WINDEVAndroidiPhone/iPad Standard horizontal mode: Row anchoring
Several display modes are available:
  • Variable row height. Simply indicate the number of rows to be displayed. The height of each row will change according to the height of the control.
    If the height of the control changes, the height of each row will increase or decrease proportionally.
  • Variable height and number of rows. If the height of the control allows the display of an additional row, this row is added. If this row cannot be added, the height of the row will change. You must specify the minimal height of the row to display. This minimum height will be used for each row of the Looper control.
  • Variable number of rows (top). Simply specify the row height . This height will be used for each one of the rows in the Looper control. The number of rows will change according to the height of the control.
    The number of rows will increase or decrease when the control height changes. If it is not possible to add a row, an empty area will be displayed at the bottom of the looper.
  • Variable number of rows (centered). Simply specify the row height. This height will be used for each one of the rows in the Looper control. The number of rows will change according to the height of the control.
    The number of rows will increase or decrease when the control height changes. If it is not possible to add a row, an empty area will be displayed on either side of the rows.
  • Fixed height and number of rows (top): Simply specify the number of rows to display and the height of rows.
    When the control height changes, neither the number of rows nor the row height will change. An empty area will appear at the bottom of the columns.
    iPhone/iPad This option is not available.
  • Fixed height and number of rows (centered): Simply specify the number of rows to display and the height of rows.
    When the control height changes, neither the number of rows nor the row height will change. An empty area will appear on either side of the rows.
    iPhone/iPad This option is not available.
Limitation: the breaks cannot be used in a horizontal Looper control.

Resizing the cells of a Looper control

You can allow the user to resize the cells in a Looper control. In the "Details" tab of the control description, check the "Resizable" option next to:
  • "Row height".
  • "Column width".
Remark: The default height of a row can be specified.
Input parameters and scrollbar display
WINDEVUniversal Windows 10 App

Input parameters

Input parameters specify the behavior of Looper controls based on a data file in edit mode. The possible options are as follows:
  • Cascading input: Pressing the Enter key in an edit control is used to automatically perform an input in a new row.
    Universal Windows 10 App This option is not available.
  • Save during row exit or Save during column exit: The record currently modified or created will be automatically saved in the corresponding data file as soon as the row is no longer selected. If this option is not selected, the record must be saved programmatically with LooperSave.
  • Lock the record in modification: When modifying a row, the corresponding record in the data file will be automatically locked until the modification is validated.
WINDEVUniversal Windows 10 App

Scrollbar

The display of horizontal/vertical scrollbar can be:
  • automatic: the scrollbar will be displayed when necessary.
  • always visible: the scrollbar will always be displayed.
  • never visible: the scrollbar will never be displayed.
A tooltip can be displayed on the vertical scrollbar. This tooltip displays the number of the current row in relation to the total number of rows.
Universal Windows 10 App This option is not available.

Move and gesture

The following options are available:
  • Per-pixel scrolling: a row may not be entirely displayed according to the scrollbar position.
  • Touch scrolling: used to handle the scrollbar via a touch screen.
AndroidiPhone/iPad Specific options regarding the moves and gestures can also be defined. For more details, see Looper: Moves and gestures.
WINDEVUniversal Windows 10 App

Search control

The Looper control allows searching in the data displayed. The available options are:
  • By using the menu of A.A.F.: The search will be performed via the "Search" option of the AAF menu (Automatic Application Features).
  • Always visible: a search control will always be displayed above the Looper control.
  • Never: No search can be performed in the Looper control.
Windows
Populate Looper controls programmatically
When a Looper control is populated programmatically, some specific information can be displayed:
  • Progress Bar,
  • Information window, etc.
To display information when populating a Looper control programmatically:
  1. Open the Looper control description window.
  2. In the "Details" tab of the control description window, check "Display an internal window over the rows".
  3. If necessary, specify the internal window to be used. You can:
    • use the WINDEV default window ("None" option).
    • import the preset window into the project and customize it ("Preset window" option).
      If this option is selected, the WDAAF internal component is immediately added to the current project. The "IW_TableLoadStatus" internal window is automatically associated with the feature.
      Remark: If the WDAAF component already exists, only the window is added to the component.
  4. If necessary, validate the control description window.
  5. To enable this mechanism, call LooperStartFilling and LooperEndFilling to frame the code used to populate the Looper control.
Remarks:
  • By default, the "No available data" message is displayed in the empty Looper control. During the fill, an infinite progress bar is displayed at the bottom of the Looper control.
  • The default internal window has 3 planes:
    • Plane 1 containing an infinite progress bar.
    • Plane 2 containing the caption displayed if the Looper control is empty. The caption "No available data" is displayed by default.
    • Plane 3 containing the caption displayed before the call to LooperStartFilling.
  • The "IW_TableLoadStatus" internal window can also be used to programmatically populate Table controls.
Variable row content
The Looper controls allow you to customize the appearance of rows: layout, content, ...

Implementation

To create a Looper control with variable content:
  1. Create a Looper control populated programmatically. This control must be a vertical Looper control containing a single column.
  2. Open the Looper control description window.
  3. In the "Content" tab of control description:
    • Check "Use an internal window per row (LooperAddIW function)".
    • Indicate the mode for unloading the internal windows:
      • Never: The internal windows are loaded when the associated row is visible in the control. The unload is never performed when using the control. It is performed when closing the window. This mode is recommended if there are few internal windows and if they do not contain many controls .
        Advantage: The entire data is always available
        Drawback: High memory consumption.
      • When the row is no longer visible (option selected by default): The internal windows are loaded when the associated row is visible in the control. The unload is performed when the row is not visible anymore. This mode is recommended for the non-editable Looper controls. Indeed, if an internal window allows the input, the content typed by the user is lost when this internal window is no longer visible.
        Advantage: Consumes little memory.
        Drawback: Loss of information typed by the user.
      • Row not visible + IW containing read-only controls: The internal windows are loaded when the associated row is visible in the control. The unload is performed according to the type of row:
        • If the row contains no control allowing the user input, the associated internal window is unloaded when it is no longer visible.
        • If the row allows the input, the associated internal window is never unloaded.
  4. Validate the control description window.
  5. Create the different internal windows corresponding to the rows of Looper control.
  6. Add the internal windows into the Looper control via the following functions:
    LooperAddIWAdds a row as an internal window at the end of a Looper control populated programmatically.
    LooperInsertIWInserts a row as an internal window into a Looper control populated programmatically.
    LooperModifyIWModifies a row corresponding to an internal window in a Looper control populated programmatically.

Characteristics of internal windows

The characteristics regarding the width and height of internal windows are as follows:
  • Height: The height of the row using an internal window exactly corresponds to the height of internal window defined in edit. The height of internal window cannot exceed the height of Looper control.
  • Width:
    • If the width of the internal window is less than the width of the Looper control, the internal window is automatically increased and anchors are applied.
    • If the width of the internal window exceeds the width of the Looper control, the internal window is automatically truncated.
    In most cases, we advise you to create the internal window with the smallest possible width and to use anchors.
Remark: If the internal window includes controls adapted to content, the row height will be increased or reduced according to the content.
Related Examples:
The Looper control Unit examples (WINDEV): The Looper control
[ + ] Using the Looper control.
You have the ability to add a row with LooperAddLine.
The following syntax is used to retrieve the existing values:
  AttributeName[Subscript]
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 Attendance Cross-platform examples (WINDEV Mobile): WM Attendance
[ + ] This application is an attendance manager. It allows you to list the persons who attended a meeting.
The database is filled beforehand with the list of registered persons.
You have the ability to find a person by using his/her name.
The following topics are presented in this example:
1/ using a browsing looper based on a query
2/ using a database in HFSQL format.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment