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 / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones Looper
  • Use conditions
  • Adding an empty row
  • Row characteristics
  • Sort
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
Inserts a row into a Looper control.
Remark: To add elements to the end of a RepeatString Looper control, use the <Looper>.AddLine function.
Ejemplo
// Ajout de valeurs dans le champ Zone répétée en 12ème position
ZR_Zone1.InsèreLigne(12, Nom, Prénom, NumTel, NumFax)
// Insertion d'informations recherchées dans la base de données
i is int = 1
ZR_REPETE1.SupprimeTout()
HReadSeek(Produit, NomProd, "Fenêtre")
WHILE HOut() = False
	ZR_REPETE1.InsèreLigne(i, Produit.NomProd, Produit.Code)
	HReadNext(Produit, NomProd)
	i ++
END
Sintaxis

Insertando una fila en un control Looper con atributos Ocultar los detalles

<Looper control>.InsertLine([<Index> [, <Value 1> [... [, <Value N>]]]])
<Looper control>: Nombre del control
Name of the Looper control to be used.
<Index>: Entero opcional
Index of the row from which the new row will be inserted.
Index not specifiedThe row will be inserted before the current row. If no row is selected, the row will be inserted at the last position in the Looper control.
Index greater than the number of rows in the controlThe row will be inserted at the last position in the Looper control. In this case, <Looper>.InsertLine is equivalent to <Looper>.AddLine.
Index equal to 0The row will be inserted at the first position in the Looper control.
Index equal to -1The row will be inserted before the current row. If no row is selected, the row will be inserted at the last position in the Looper control.
<Value 1>: Tipo de atributo asociado (opcional)
Value of the 1st attribute of the row to be inserted in the specified Looper control.
The different values must be specified in the order of the attributes (Looper control description window).
If you don't want to specify a value for one of the attributes, use an empty string ("") or 0 (depending on the attribute type).
If none of these parameters is specified, an empty row will be inserted into the Looper control.
<Value N>: Tipo de atributo asociado (opcional)
Value of the Nth attribute of the row to be inserted into the specified Looper control.
The different values must be specified in the order of the attributes (Looper control description window).
If you don't want to specify a value for one of the attributes, use an empty string ("") or 0 (depending on the attribute type).
If none of these parameters is specified, an empty row will be inserted into the Looper control.
Reportes y Consultas

Insertar una fila en un control Looper sin atributos Ocultar los detalles

<Looper control>.InsertLine([<Index>])
<Looper control>: Nombre del control
Name of the Looper control to be used.
<Index>: Entero opcional
Index of the row from which the new row will be inserted.
  • If this parameter is not specified or is equal to -1, the row will be inserted before the current row. If no row is selected, the row will be inserted at the end of the Looper control.
  • If <Index> is greater than the number of rows, the row will be inserted at the last position in the Looper control. In this case, <Looper>.InsertLine is equivalent to <Looper>.AddLine.
  • If this parameter is 0, the row will be inserted at the first position in the Looper control.
Observaciones

Use conditions

La función <Looper>.InsertLine puede utilizarse en:
  • un control Looper basado en un archivo de datos,
  • un control Looper rellenado mediante programación.

Adding an empty row

After adding an empty row, each attribute or control must be initialized individually.
For example:
  • For a Looper control with attributes:
    // Ajout d'une répétition vide
    ZR_REPETE1.InsèreLigne(14)
    
    // Puis initialisation des attributs
    AttributNom[14] = "Hobbes"
    AttributPrénom[14] = "Samantha"
    AttributCouleurPrénom[14] = LightRed
    AttributVisibleAdresse[14] = False
  • For a Looper control without attributes:
    // Ajout d'une répétition vide
    ZR_REPETE1.InsèreLigne(14)
    
    // Puis initialisation des champs
    ZR_Zone1[14].ChampNom = "Hobbes"
    ZR_Zone1[14].ChampPrénom = "Samantha"
    ZR_Zone1[14].ChampPrénom.CouleurFond = LightRed
    ZR_Zone1[14].ChampAdresse.Visible = False

Row characteristics

If a value is the result of a calculation, enclose the numerical expression in brackets.
For example:
ZR_ZoneCalcul.InsèreLigne(10, (53+29), (83-21))

Sort

<Looper>.InsertLine ignores the sort.
Componente: wd300obj.dll
Versión mínima requerida
  • Versión 23
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 30/09/2024

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