ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Display control
  • Overview
  • Initializing a formatted display control (server code)
  • Retrieving the value of a formatted display control (server code)
  • Use example
  • How do I display the following text in a page: "date of last update: dd/mm/yyyy":
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Handling a formatted display control through programming
Overview
WEBDEV allows you to handle a formatted display control through programming. To do so, use the variable of the formatted display control in the code.
The variable of the formatted display control corresponds to the name of the formatted display control. The type of the variable depends on the control type (numeric, text, currency, ...).
Initializing a formatted display control (server code)
To initialize a formatted display control, a simple assignment of the control variable is sufficient. This initialization must be done in server code. For example:
// Initialize the formatted display control named "FSTC_Date"
FSTC_Date = 19990506
// Other possibility: Date.Value = "19990506"
Remark: you can also use the Value or Caption properties.
Retrieving the value of a formatted display control (server code)
To retrieve the content of a formatted display control (static or dynamic) in a server code:
  • perform a simple assignment. For example:
    CurrentDispContent = FSTC_FORMATTED1
  • handle the formatted display control directly. For example:
    Info(FSTC_FORMATTED1)
  • use the Value or Caption properties.
Use example

How do I display the following text in a page: "date of last update: dd/mm/yyyy":

  1. Creating a formatted display control.
  2. In the initialization code of the control, enter the following code:
    MySelf = fDate(CompleteDir(fExeDir()) + "MySite.WDL", "", fModify)
    Where "MySite.WDL" corresponds to the WDL for your site.
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help