PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Assigning variables
  • Edit control
  • Static control
  • Check box
  • Radio button
  • Text button and graphic button
  • Image
  • Scrollbar
  • Drop-down list or expanded list
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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, a simple assignment is enough to assign a value to a control.
Syntax
Displays([<Window Name>,] <Name> [, <Subscript 1> [, <Subscript 2>]] , <Value>)
<Window Name>: 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.
<Subscript 1>: Character string (optional)
Subscript for a subscripted control or for a subscripted variable.
<Subscript 2>: Character string (optional)
Subscript for a two-dimensional subscripted variable
<Value>: Character string
Value of the control to display or value of the 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>[,Subscript>]=<Text>
The decimal separator is the dot.
Example in C:
// Assign 100.12 in the PriceBT variable (real)
CALLWD("DISPLAY,PRICEBT=100.12");
// Display Friday in the DayName variable (string)
CALLWD("DISPLAY,DAYNAME=Friday");
// Pass the value to display by variable
CALLWD("DISPLAY,PRICEBT=%d",Price);
CALLWD("DISPLAY,DAYNAME=%s",Day);
Example in Pascal:
(*Assign 100.12 in the PriceBT variable (real) *)
CALLWD('DISPLAY,PRICEBT=100.12');
(*display Friday in the DayName variable (string) *)
CALLWD('DISPLAY,DAYNAME=Friday');
(*pass the value to display by variable *)
CALLWD('DISPLAY,PRICEBT='+Price);
CALLWD('DISPLAY,NAME='+CustName);
Example in VB:
'Assign 100.12 in the PriceBT variable (real)
call CALLWD("DISPLAY,PRICEBT=100.12")
'display Friday in the DayName variable (string)
call CALLWD("DISPLAY,DAYNAME=Friday")
'pass the value to display by variable
call CALLWD("DISPLAY,PRICEBT="+Price)
call CALLWD("DISPLAY,DAYNAME="+Day)

Edit control

<Value> must be passed to CALLWD in text format, even if the control is a numeric control:
DISPLAY,<Control Name>[,<Subscript>]=<Text>
The decimal separator is the dot.
Example in C:
// Display the value 100, 12 in the numeric control named PRICE
CALLWD("DISPLAY,PRICE=100.12");
// Display Friday in the subscripted control named DAY at subscript 31
CALLWD("DISPLAY,DAY,31=Friday");
//Pass the value to display by variable
CALLWD("DISPLAY,NAME=%s",CustName);
Example in Pascal:
(*Assign 100.12 in the PriceBT variable (real) *)
CALLWD('DISPLAY,PRICEBT=100.12');
(*display Friday in the DayName variable (string) *)
CALLWD('DISPLAY,DAYNAME=Friday');
(*pass the value to display by variable *)
CALLWD('DISPLAY,PRICEBT='+Price);
CALLWD('DISPLAY,NAME='+CustName);
Example in VB:
'Display the value 100,12 in the numeric control named PRICE
call CALLWD("DISPLAY,COUNTER=100.12")
'Display Friday in the subscripted control named DAY at subscript 31
call CALLWD("DISPLAY,DAY,31=Friday")
'Pass the value to display by variable
call CALLWD("DISPLAY,NAME="+CustName)
Note: For the long texts (exceeding 200 characters), use DisplayLongText.

Static control

<Value> is the new caption to display:
DISPLAY,<Control Name>=<Text>
The decimal separator is the dot.
Example in C:
CALLWD("DISPLAY,StcText=Customer Name");
Example in Pascal:
CALLWD('DISPLAY,StcText=Customer Name');
Example in VB:
Call CALLWD("DISPLAY,StcText=Customer Name")

Check box

To check the check box, <Value> can be equal to "O" or "1":
DISPLAY,<Control Name>[,<Subscript>]="O"
DISPLAY,<Control Name>[,<Subscript>]="1"
To uncheck the check box, <Value> can be equal to "N" or "0":
DISPLAY,<Control Name>[,<Subscript>]="N"
DISPLAY,<Control Name>[,<Subscript>]="0"
Example in C:
CALLWD("DISPLAY,CBOX=O");  // Checks
CALLWD("DISPLAY,ARRCBOX,2=N"); // Unchecks
Example in Pascal:
CALLWD('DISPLAY,CBOX=O');(* Marks   *)
CALLWD('DISPLAY,ARRCBOX,2=N'); (* Unchecks *)
Example in VB:
Call CALLWD("DISPLAY,CBOX,2=O") 'Checks
Call CALLWD("DISPLAY,ARRCBOX,2=N") 'Unchecks

Radio button

<Value> is the number of the option to select:
DISPLAY,<Control Name>=<Option Number>
Example in C:
CALLWD("DISPLAY,RADIO=1");   // option 1 in progress
CALLWD("DISPLAY,CUSTYPE=3");  // option 3 in progress
Example in Pascal:
CALLWD('DISPLAY,RADIO=1');  (*option 1 in progress*)
CALLWD('DISPLAY,CUSTYPE=3');  (*option 3 in progress*)
Example in VB:
Call CALLWD("DISPLAY,RADIO=1") 'option 1 in progress
Call CALLWD("DISPLAY,CUSTTYPE=3") 'option 3 in progress

Text button and graphic button

<Value> can be the new caption of the button:
DISPLAY,<Control Name>=<Button Caption>
<Value> can be the new image of the button:
DISPLAY,<Control Name>=<Button Image>
Example in C:
CALLWD("DISPLAY,BTOK=Validate");
CALLWD("DISPLAY,BTOK=IMGOK.BMP");
Example in Pascal:
CALLWD('DISPLAY,BTOK=VALIDATE');
CALLWD('DISPLAY,BTOK=IMGOK.BMP');
Example in VB:
call CALLWD("DISPLAY,BTOK=VALIDATE")
call CALLWD("DISPLAY,BTOK=IMGOK.BMP")

Image

<Value> can be the name of the image file to display.
DISPLAY,<Control Name>=<Name of Image File>
Example in C:
CALLWD("DISPLAY,Photo=VIDAL.BMP");
Example in Pascal:
CALLWD('DISPLAY,PHOTO=VIDAL.BMP');
Example in VB:
Call CALLWD("DISPLAY,PHOTO=VIDAL.BMP")

Scrollbar

<Value> corresponds to the position of the scrollbar:
DISPLAY,<Control Name>=<Position>
Example in C:
CALLWD("DISPLAY,SCROLL=35");  // position 35
Example in Pascal:
CALLWD('DISPLAY,SCROLL=35');  (*position 35*)
Example in VB:
Call CALLWD("DISPLAY,SROLL=35")  'position 35

Drop-down list or expanded list

If <Subscript> is specified:
DISPLAY,<Control Name>,<Subscript>=<Value>
  • if <Subscript> is greater than the number of elements found in the list, the value is added to the list
  • if <Subscript> is less than or equal to the number of elements found in the list, the value is modified at the specified subscript.
If the subscript is not specified:
DISPLAY,<Control Name> = <Value>

The current element becomes the element whose subscript corresponds to the value passed in parameter.
For the editable combo boxes, the value will be displayed in the edit control.
Example in C:
CALLWD("DISPLAY,COMBO1,5=DOE");  
// DOE is inserted at subscript 5
Example in Pascal:
CALLWD('DISPLAY,COMBO1,5=DOE');
(* DOE is inserted at subscript 5 *)
Example in VB:
Call CALLWD("DISPLAY,COMBO1,5=DOE")
' DOE is inserted at subscript 5
Minimum required version
  • Version 14
Comments
Click [Add] to post a comment