ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

  • Overview
  • Initializing a Static control
  • Retrieving the value of a Static control
  • Advanced use of Static controls (Browser code)
  • Tip: getting or setting the value of a Static control
  • Properties specific to the management of a Static control
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 Static control programmatically
Overview
WINDEV, WINDEV Mobile and WEBDEV allow you to handle a Static control programmatically. To do so, use the variable of the Static control in the code.
The variable of the Static control corresponds to the name of the static . A Static control always is a Text control.
Initializing a Static control
To initialize a Static control, all you have to do is assign the variable of the Static control.
For example:
// Assign the last and first names read in the Customer data file to a Static control
STC_MyStatic = Customer.LastName + "  " + Customer.FirstName
Retrieving the value of a Static control
To retrieve the content of a Static control:
  • perform a simple assignment. For example:
    CurrentStaticContent = STC_STATIC1
  • use the Static control directly. For example:
    Info(STC_STATIC1)
  • use the Value or Caption properties.
Advanced use of Static controls (Browser code)
WEBDEV - Server code

Tip: getting or setting the value of a Static control

You can get or set the value of a Static control in browser code with JSProperty.
Reminder: This option is reserved to the developers who are familiar with JavaScript.
Example:
// -- Click code (browser) of BTN_MODIF button
JSProperty("tz" + "STCBRWMOD", "innerHTML") = "Static caption, this static was modified"
Remark: The "tz" string is used to identify the Static control.
Properties specific to the management of a Static control
The following properties are used to manage the characteristics of a Static control through programming.
AnimationUsed to find out the current status of the animation in a Static control and to start/stop an animation in an animated Static control.
InitialAnimationUsed to find out the initial status of the animation in a Static control.
EllipsisUsed to find out and modify the management mode of the ellipsis in a Static control.
CaptionUsed to find out and modify the caption of the control.
FontMinSizeUsed to find out and modify the minimum font size used in a Static control with the option "Reduce font".
BottomIndentUsed to find out and modify the bottom margin of a Static control.
RightIndentUsed to find out and modify the right margin of a Static control.
LeftIndentUsed to find out and modify the left margin of a Static control.
TopIndentUsed to find out and modify the top margin of a Static control.
RichEditUsed to find out and modify the RTF characteristic (Rich Text Format) of a Static control.

For a complete list of WLanguage properties that can be used with a Static control, see Properties associated with a Static control.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment