- Assigning variables
- Edit control
- Static control
- Check Box
- Radio Button
- Text button and graphic button
- Image
- Scrollbar
- Drop-down list or expanded list
Display (External language) In french: Affichage Displays a value in a control or assigns a value in a variable. Remark: In WLanguage, a simple assignment is enough to assign a value to a control. 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 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: // 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) <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: // Display the value 100, 12 in the numeric control named PRICE CALLWD("DISPLAY,PRICE=100.12"); // Display Friday in the indexed control named DAY at index 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 indexed control named DAY at index 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. <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") To check the check box, <Value> can be equal to "O" or "1": DISPLAY,<Control name>[,<Index>]="O" DISPLAY,<Control name>[,<Index>]="1" To uncheck the check box, <Value> can be equal to "N" or "0": DISPLAY,<Control name>[,<Index>]="N" DISPLAY,<Control name>[,<Index>]="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") <Value> can be the name of the image file to display. DISPLAY,<Control name>=<Image file name> 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") <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 <Index> is specified: DISPLAY,<Control name>,<Index>=<Value> - if <Index> is greater than the number of elements in the list, the value is added to the list
- if <Index> is less than or equal to the number of elements in the list, the value changes to the specified index.
If the index is not specified: DISPLAY,<Control name> = <Value> 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: CALLWD("DISPLAY,COMBO1,5=DOE"); // DOE is inserted at index 5 Example in Pascal: CALLWD('DISPLAY,COMBO1,5=DOE'); (* DOE is inserted at index 5 *) Example in VB: Call CALLWD("DISPLAY,COMBO1,5=DOE") ' DOE is inserted at index 5
|
|
|