PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Overview
  • Initializing a Static control
  • Retrieving the value of a Static control
  • Advanced use of static controls (browser code)
  • Tip: modifying or retrieving 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Handling a Static control by programming
Overview
WINDEV, WINDEV Mobile and WEBDEV allow you to handle a Static control by programming. 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 ..Value or ..Caption.
Advanced use of static controls (browser code)
WEBDEV - Server code

Tip: modifying or retrieving the value of a static control

You have the ability to retrieve or modify 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 by 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 ellipsis in a Static control.
CaptionUsed to find out and modify the caption of the control.
Versions 25 and later
FontMinSize
New in version 25
FontMinSize
FontMinSize
Used to find out and modify the minimum font size used in a Static control with the option "Reduce font".
Versions 22 and later
BottomIndent
New in version 22
BottomIndent
BottomIndent
Used to find out and modify the bottom margin of a Static control.
Versions 22 and later
RightIndent
New in version 22
RightIndent
RightIndent
Used to find out and modify the right margin of a Static control.
Versions 22 and later
LeftIndent
New in version 22
LeftIndent
LeftIndent
Used to find out and modify the left margin of a Static control.
Versions 22 and later
TopIndent
New in version 22
TopIndent
TopIndent
Used 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.

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