ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Managing external languages / Object functions
  • Assigning variables
  • Edit control
  • Static Text control
  • Check Box
  • Radio Button
  • Text button and graphic button
  • Image
  • Scrollbar
  • Drop-down list or expanded list
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Display (External language)
In french: Affichage
Displays a value in a control or assigns a value in a variable.
Note: In WLanguage, to assign a value to a field, a simple assignment is sufficient.
Syntax
Displays([<Name of the window>, ] <Name> [, <Index 1> [, <Index 2>]] , <Value>)
<Name of the window>: Character string (optional)
Name of the window where the element must be displayed. This parameter must be specified only if this window differs from the current window. For example, the "Name" control belongs to the WIN_Form window that is not the current window.
<Name>: Character string
Name of the control to display or name of the variable to assign in the window.
<Index 1>: Character string (optional)
Index for an indexed control or for an indexed variable.
<Index 2>: Character string (optional)
Index for a two-dimensional indexed variable
<Value>: Character string
Value of control to display or value of variable to assign.
Remarks

Assigning variables

When assigning a variable, <Value> must be passed to CALLWD in text format, even if the variable is a numeric variable:
DISPLAY,<Variable name>[,Index>]=<Text>
The decimal separator is the dot.
Example in C:
// Affectation de 100.12 dans la variable PrixHT de type réel
APPELWD("AFFICHE,PRIXHT=100.12");
// Affichage de Vendredi dans la variable NomJour de type Chaine
APPELWD("AFFICHE,NOMJOUR=Vendredi");
// Passage de la valeur à afficher par variable
APPELWD("AFFICHE,PRIXHT=%d",Prix);
APPELWD("AFFICHE,NOMJOUR=%s",Jour);
Example in Pascal:
(*Affectation de 100.12 dans la variable PrixHT de type réel *)
APPELWD('AFFICHE,PRIXHT=100.12');
(*affichage de Vendredi dans la variable NomJour de type Chaine *)
APPELWD('AFFICHE,NOMJOUR=Vendredi');
(*passage de la valeur à afficher par variable *)
APPELWD('AFFICHE,PRIXHT='+Prix);
APPELWD('AFFICHE,NOM='+NomCli);
Example in VB:
'Affectation de 100.12 dans la variable PrixHT de type réel
call APPELWD("AFFICHE,PRIXHT=100.12")
'affichage de Vendredi dans la variable NomJour de type Chaine
call APPELWD("AFFICHE,NOMJOUR=Vendredi")
'passage de la valeur à afficher par variable
call APPELWD("AFFICHE,PRIXHT="+Prix)
call APPELWD("AFFICHE,NOMJOUR="+Jour)

Edit control

<Value> must be passed to CALLWD in text format, even if the control is a numeric control:
DISPLAY,<Control name>[,<Index>]=<Text>
The decimal separator is the dot.
Example in C:
// Affichage de la valeur 100,12 dans le champ numérique PRIX
APPELWD("AFFICHE,PRIX=100.12");
// Affichage de Vendredi dans le champ indicé JOUR à l'indice 31
APPELWD("AFFICHE,JOUR,31=Vendredi");
//Passage de la valeur à afficher par variable
APPELWD("AFFICHE,NOM=%s",NomCli);
Example in Pascal:
(*Affectation de 100.12 dans la variable PrixHT de type réel *)
APPELWD('AFFICHE,PRIXHT=100.12');
(*affichage de Vendredi dans la variable NomJour de type Chaine *)
APPELWD('AFFICHE,NOMJOUR=Vendredi');
(*passage de la valeur à afficher par variable *)
APPELWD('AFFICHE,PRIXHT='+Prix);
APPELWD('AFFICHE,NOM='+NomCli);
Example in VB:
'Affichage de la valeur 100,12 dans le champ numérique PRIX
call APPELWD("AFFICHE,COMPTEUR=100.12")
'Affichage de Vendredi dans champ indicé JOUR à l'indice 31
call APPELWD("AFFICHE,JOUR,31=Vendredi")
'Passage de la valeur à afficher par variable
call APPELWD("AFFICHE,NOM="+NomCli)
Note: For long texts (over 200 characters), use the AfficheTexteLong function.

Static Text control

<Value> is the new caption to display:
AFFICHE,<Nom du champ>=<Texte>
The decimal separator is the dot.
Example in C:
APPELWD("AFFICHE,LibTexte=Nom du client");
Example in Pascal:
APPELWD('AFFICHE,LibTexte=Nom du client');
Example in VB:
Call APPELWD("AFFICHE,LibTexte=Nom du client")

Check Box

To check the check box, <Value> can be equal to "O" or "1":
AFFICHE,<Nom du champ>[,<Indice>]="O"
AFFICHE,<Nom du champ>[,<Indice>]="1"
To uncheck the check box, <Value> can be equal to "N" or "0":
AFFICHE,<Nom du champ>[,<Indice>]="N"
AFFICHE,<Nom du champ>[,<Indice>]="0"
Example in C:
APPELWD("AFFICHE,INTERR=O");  // Marque
APPELWD("AFFICHE,TABINTERR,2=N"); // Démarque
Example in Pascal:
APPELWD('AFFICHE,INTERR=O');(* Marque   *)
APPELWD('AFFICHE,TABINTERR,2=N'); (* Démarque *)
Example in VB:
Call APPELWD("AFFICHE,INTERR,2=O") 'Marque
Call APPELWD("AFFICHE,TABINTERR,2=N") 'Démarque

Radio Button

<Value> is the number of the option to select:
AFFICHE,<Nom du champ>=<Numéro de l'option>
Example in C:
APPELWD("AFFICHE,SELECT=1");   // option 1 en cours
APPELWD("AFFICHE,TYPECLI=3");  // option 3 en cours
Example in Pascal:
APPELWD('AFFICHE,SELECT=1');  (*option 1 en cours*)
APPELWD('AFFICHE,TYPECLI=3');  (*option 3 en cours*)
Example in VB:
Call APPELWD("AFFICHE,SELECT=1") 'option 1 en cours
Call APPELWD("AFFICHE,TYPECLI=3") 'option 3 en cours

Text button and graphic button

<Value> can be the new caption of the button:
AFFICHE,<Nom du champ>=<Libellé du bouton>
<Value> can be the new image of the button:
AFFICHE,<Nom du champ>=<Image du bouton>
Example in C:
APPELWD("AFFICHE,BTOK=Valider");
APPELWD("AFFICHE,BTOK=IMGOK.BMP");
Example in Pascal:
APPELWD('AFFICHE,BTOK=VALIDER');
APPELWD('AFFICHE,BTOK=IMGOK.BMP');
Example in VB:
call APPELWD("AFFICHE,BTOK=VALIDER")
call APPELWD("AFFICHE,BTOK=IMGOK.BMP")

Image

<Value> can be the name of the image file to display.
AFFICHE,<Nom du champ>=<Nom du fichier image>
Example in C:
APPELWD("AFFICHE,Photo=VIDAL.BMP");
Example in Pascal:
APPELWD('AFFICHE,PHOTO=VIDAL.BMP');
Example in VB:
Call APPELWD("AFFICHE,PHOTO=VIDAL.BMP")

Scrollbar

<Value> corresponds to the position of the scrollbar:
AFFICHE,<Nom du champ>=<Position>
Example in C:
APPELWD("AFFICHE,ASCENS=35");  // position 35
Example in Pascal:
APPELWD('AFFICHE,ASCENS=35');  (*position 35*)
Example in VB:
Call APPELWD("AFFICHE,ASCENS=35")  'position 35

Drop-down list or expanded list

If <Index> is specified:
AFFICHE,<Nom du champ>,<Indice>=<Valeur>
  • if <Index> is greater than the number of elements in the list, the value is added to the list
  • if <Indice> is less than or equal to the number of elements in the list, the value is changed to the specified index.
If the index is not specified:
AFFICHE,<Nom du champ> = <Valeur>

The current element becomes the element whose index corresponds to the value passed as parameter.
For the editable combo boxes, the value will be displayed in the edit control.
Example in C:
APPELWD("AFFICHE,COMBO1,5=DUPOND");  
// DUPOND inséré à l'indice 5
Example in Pascal:
APPELWD('AFFICHE,COMBO1,5=DUPOND');
(* DUPOND inséré à l'indice 5 *)
Example in VB:
Call APPELWD("AFFICHE,COMBO1,5=DUPOND")
' DUPOND inséré à l'indice 5
Minimum version required
  • Version 14
Comments
Click [Add] to post a comment

Last update: 09/21/2024

Send a report | Local help