AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Controles: tipos disponibles / Control Looper
  • Overview
  • Operating mode and general parameters ("General" tab)
  • Operating mode
  • Maximum number of rows per page
  • Context menu
  • Direct access to the properties of the controls (without using attributes)
  • Display mode and its settings ("Details" tab)
  • Display mode: Grid view
  • Display mode: Online gallery
  • Display mode: Column gallery
  • Content of a Looper control manipulated programmatically
  • Infinite looper
  • Different content on each row of the Looper control
  • Control style ("Style" tab)
  • Element "Frame/Background": Frame thickness
  • Left button, Right button and Close button
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Overview
To view the characteristics of the control, select "Description" in the context menu. There are two types of information:
  • information about the entire Looper control (select the name of the Looper control).
  • information about each attribute of the looper (select the name of the looper attribute). In this case, only the "Binding" tab is available.
In WEBDEV, different operating modes are available:
  • Standard looper.
  • AJAX looper.
    Note: This type of RepeatString zone means that the page is not completely refreshed for each server action. It is also used to get an interface closer to the one of a Windows application, by proposing scrollbars instead pagers.
  • Browser looper.
    Note: This type of RepeatString zone can be fully manipulated by programming in Browser code. It can operate in stand-alone mode, without accessing the server. This type of looper is recommended in off-line mode or in WebApp sites. It can also be used in static sites.
WEBDEV also includes different display modes:
  • Grid view: This view displays the various fields of the RepeatString as a grid.
  • Online gallery: This presentation mode allows you to create an online image gallery.
  • Column gallery: This presentation mode allows you to create a column gallery of images.
The different tabs in the Looper control description window allow you to define:
  • the operating mode ("General" tab).
  • the initial state of the control and the selection mode ("UI" tab).
  • the display mode and its settings ("Details" tab).
  • the population mode and the breaks ("Content" tab).
  • the style of the different looper elements ("Style" tab).
Operating mode and general parameters ("General" tab)

Operating mode

The different operating modes are:
Operating mode
  • Standard looper.
    In standard mode, the entire page is refreshed each time an action is performed on the server.
    This operating mode includes an optional pager (to move between the different pages of data displayed by the control).
    This mode of operation is compatible with any display mode: grid view, online gallery or column gallery.
  • AJAX looper.
    This type of looper is used to avoid refreshing the page at each server action. It is also used to get an interface closer to the one of a Windows application, by proposing scrollbars instead pagers.
    This operating mode is compatible with a grid view.
  • Browser looper.
    This type of looper can be manipulated programmatically in browser code. It can operate in stand-alone mode, without accessing the server.
    This type of looper is recommended in off-line mode or in WebApp sites. It can also be used in static sites.
    This operating mode is compatible with a grid view.

Maximum number of rows per page

This option is used to specify the maximum number of rows allowed on the page.
If the number of rows in the Looper control is greater than this value:
  • for a standard Looper control, an associated Pager control can be used to view additional rows.
  • for an AJAX Looper control, a scrollbar appears and allows users to view the additional rows.
If the number of rows in the Looper control is less than this value:
  • for a standard Looper control in a page that doesn't use zoning mode, space is kept for the rows.
  • for a standard Looper control in a page that uses zoning mode and with anchors set to fit to the content, space is not kept for the rows. The controls below the Looper control automatically snap to it.
  • for an AJAX Looper control, space is kept for the rows.
This option is available for standard and AJAX Looper controls.
Remarks:
  • The maximum number of rows per page can be dynamically changed using the NbLinesPerPage property.
  • If the number of rows in a new Looper control based on a data file is greater than the maximum number specified, a pager is automatically associated with the control. The pager makes it possible to view all the records in the Looper control.

Context menu

A context menu can be displayed for a Looper control. This context menu will allow the user to export the content of the Looper control to Word, Excel, OpenOffice, XML, etc.
To enable this context menu, check "Mostrar un botón con el menú de las FAA". You can also choose the image that will be used for the context menu. We recommend using an image with the following dimensions: 15 X 15 pixels.
The context menu is available only for standard and AJAX Looper controls.
Novedad versión 2025
You can customize this context menu, for example by adding specific options, using the ContextMenu property.

Direct access to the properties of the controls (without using attributes)

This option is used to dynamically change the properties of the controls in the looper without declaring attributes.
For example, the following syntax can be used to change the background color of a Static Text control in a Looper control:
LOOP_MyLooper[nRow].STC_MyStatic.ColorBackground = MyColor
Display mode and its settings ("Details" tab)

Display mode: Grid view

There are multiple modes available if the Looper control displays the data in a grid view:
  • In Zoning mode:
    • Fixed number of columns/Fill by rows.
      All you have to do is specify the number of columns to display. The looper will be populated horizontally until it reaches the specified number of columns and then starts in a new row. The number of columns does not change when the user changes the page width.
      This display mode is available for standard, AJAX and Browser loopers.
    • Variable number of columns/Fill by rows.
      The number of columns depends on the page width. The number of columns increases or decreases when the user changes the page width.
      You can define the minimum number of columns.
      This display mode is available for standard and Browser loopers.
    • Fixed number of columns/Fill by columns.
      Specify the number of columns to display (greater than 1). The looper will be populated vertically until it reaches the specified number of rows and then starts a new column. The number of columns does not change when the user changes the page width.
      This display mode is available for standard loopers.
  • In Responsive Web Design mode:
    • Variable width of columns.
      All you have to do is specify the number of columns to display. The looper will be populated horizontally until it reaches the specified number of columns and then starts in a new row. The number of columns does not change when the user changes the page width.
      This display mode is available for standard, AJAX and Browser loopers.
    • Fixed width of columns.
      The number of columns depends on the page width. The number of columns increases or decreases when the user changes the page width.
      The minimum number of columns must be specified. The icon indicates that this value is specific to each slice. Therefore, this value must be modified for each slice in the page.
      Click the icon to directly define the values for each slice in the following window:

      This display mode is available for standard loopers.
    • Number of columns per slice. In a page in Responsive Web Design mode, the number of columns can change according to the slice. Each slice has a different width.
      This display mode is only available for standard loopers.
      This allows you to adapt the number of columns according to the slice width (i.e. according to the browser size).
      When this option is selected, an icon appears to the right of the specified number of columns: . This icon indicates that this value is specific to each slice. Therefore, this value must be modified for each slice in the page.
      Click the icon to directly define the values for each slice in the following window:

      This display mode is available for standard and Browser loopers.

Display mode: Online gallery

If the Looper control shows the data as a gallery in rows, you can define several options:
  • Control de referencia para la altura Set the RepeatString field to be used as a reference for the width of the images displayed in the line. This control can be an Image or Thumbnail control. If the source image is smaller than the dimensions defined in the editor, the dimensions of the reference control will be applied to the image at runtime.
  • Al hacer clic, abrir una popup de desplazamiento automático Dequeue: Automatically displays a popup allowing you to dequeue the various gallery items. This popup contains:
    • the elements in the row.
    • a "Close" button and the Next and Previous arrows. These elements can be set via the "Style" tab of the Looper control description window ("Left button", "Right button" and "Close button" elements).
  • Animar durante la reorganización de las celdas al redimensionarlas: Enables an effect to be obtained when reorganizing rows in the event of browser resizing. The duration of this animation can be specified. This value can be modified using the AnimationDuration property.
For more details on loopers in gallery mode, see Gallery Looper.

Display mode: Column gallery

If the Looper control shows the data as a gallery in columns, you can define several options:
  • Fixed number of columns/Variable width.
    The looper will be populated horizontally until it reaches the specified number of columns and then starts in a new row. The number of columns does not change when the user changes the page width.
    This display mode is available for standard loopers.
    The number of columns to display must be specified.
  • Variable number of columns/Variable width.
    The number of columns depends on the page width. The number of columns increases or decreases when the user changes the page width.
    This display mode is available for standard loopers.
  • Variable number of columns/Fixed width.
    The looper will be populated horizontally, and then vertically. The number of columns and the width of each row changes when the user changes the page width.
    This display mode is available for standard loopers. In Responsive Web Design mode, the icon indicates that this value is specific to each slice. Therefore, this value must be modified for each slice in the page. Click the icon to directly define the values for each slice in the following window:
Options specific to the gallery in columns are also available:
  • Height reference field Set the RepeatString field to be used as a reference for the height of images displayed in the line. This control can be an Image or Thumbnail control. If the source image is smaller than the dimensions defined in the editor, the dimensions of the reference control will be applied to the image at runtime.
  • When clicked, opens an automation scroll popup Dequeue: automatically displays a popup allowing you to dequeue the various elements of the gallery. This popup contains:
    • the elements in the row.
    • a "Close" button and the Next and Previous arrows. These elements can be set via the "Style" tab of the Looper control description window ("Left button", "Right button" and "Close button" elements).
  • Animate cell reorganization on resizing Animate cell rearrangement on resizing: This animates the rearrangement of rows when the browser is resized. The duration of this animation can be specified.
For more details on loopers in gallery mode, see Gallery Looper.
Content of a Looper control manipulated programmatically

Infinite looper

One way of filling a RepeatString Looper control is "if necessary": only data visible to the user is loaded into memory. The additional data is loaded on demand (when using the scrollbar for example).
Advantages Low memory footprint, faster display speeds and reduced bandwidth consumption.
Disadvantage No sorting or searching until all data is available.
For more details, see Infinite Table and Looper controls.

Different content on each row of the Looper control

The RepeatString Looper control fields let you fully customize the appearance of repeats: layout, content, etc.. This makes it possible to place Looper controls within other Looper controls.
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 the control description, check "Utilizar una página interna por fila (función LooperAddIP)".
  4. Validate the control description window.
  5. Create the different internal pages for the rows of the Looper control.
  6. Add the internal pages to the Looper control using the following functions:
    LooperAddIPAgrega una fila como página interna al final de un control Looper rellenado mediante programación.
    LooperInsertIPInserta una fila como página interna en un control Looper rellenado mediante programación.
    LooperModifyIPModifica una fila que corresponde a una página interna en un control Looper rellenado mediante programación.
Characteristics of internal pages
The following rules apply to the width and height of internal pages:
  • Height: The height of the row using an internal page corresponds exactly to the height of the internal page defined in editing. The internal page cannot be higher than the Looper control.
  • Width:
    • If the width of the internal page is less than the width of the Looper control, the internal page is automatically increased and anchors are applied.
    • If the width of the internal page exceeds the width of the Looper control, the internal page is automatically truncated.
    As a general rule, it is recommended to create the internal page with the smallest possible width and to use anchors.
Note: If the internal page has fields adapted to the content, the row height will be increased or decreased according to the content.
Control style ("Style" tab)

Element "Frame/Background": Frame thickness

The thickness of the borders of the different rows in the looper may vary depending on the browser.
For example, if the border thickness is less than 3 pixels, this characteristic:
  • will not be applied properly in Internet Explorer.
  • will be applied properly in Firefox.

Left button, Right button and Close button

The "Left button", "Right button" and "Close button" elements are used to customize the elements in the popup window displaying the image when scrolling through the images automatically (image gallery in rows or in columns).
Versión mínima requerida
  • Versión 9
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 08/01/2025

Señalar un error o enviar una sugerencia | Ayuda local