PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview of Static control
  • Control in a window, in a page (static or dynamic) or in a report
  • Creating a Static control
  • Create a Static control in a window or in a report
  • Create a Static control in a window or in a report
  • Creating a Static control in RTF format in a window
  • Creating a Static control in a page
  • Transforming a "Static" control into an "RTF" control (report editor)
  • Handling a Static control
  • Typing the text of Static control
  • Modifying a Static control in the report editor
  • Content of Static control (report editor)
  • Notes
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
Overview of Static control

Control in a window, in a page (static or dynamic) or in a report

A Static control is a control used to display a static text. The content of the control cannot be entered by the user.
To give effects to the displayed text, you have the ability to use:
  • WINDEViPhone/iPad The control style, by configuring the "Shadow" element.
    Caption with shadow
    WINDEVAndroidAndroid Widget iPhone/iPad The control style, by configuring the "Shadow" element.
    Caption with shadow
    Versions 22 and later
    AndroidAndroid Widget The shadow is now available for the Static controls.
    New in version 22
    AndroidAndroid Widget The shadow is now available for the Static controls.
    AndroidAndroid Widget The shadow is now available for the Static controls.
  • WINDEV The "RTF" type to display a text in RTF format.
    RTF static
  • WINDEV A specific animation (scroll or blink).
    Scrolling caption
WEBDEV - Server code
  • The HTML static controls: the control content is typed in the page editor. You can:
    • format part of HTML static (bold, italic, ...).
    • Versions 17 and later
      use the skin colors.
      New in version 17
      use the skin colors.
      use the skin colors.
    • Versions 17 and later
      underline the text with a color (if the browser used supports HTML5, the underlining is using this standard).
      New in version 17
      underline the text with a color (if the browser used supports HTML5, the underlining is using this standard).
      underline the text with a color (if the browser used supports HTML5, the underlining is using this standard).
    • define a link on a part of the static.
    • use a specific CSS style.
Notes:
  • Versions 15 and later
    WINDEVWindows Mobile The static controls found in a window can also be configured with a display mask to automatically format the value that is assigned to them.
    New in version 15
    WINDEVWindows Mobile The static controls found in a window can also be configured with a display mask to automatically format the value that is assigned to them.
    WINDEVWindows Mobile The static controls found in a window can also be configured with a display mask to automatically format the value that is assigned to them.
  • WEBDEV - Server code From version 20, you can no longer create HTML Static controls. The existing HTML Static controls are kept for backward compatibility.
Versions 15 and later
Android The static controls are now available for the Android applications.
New in version 15
Android The static controls are now available for the Android applications.
Android The static controls are now available for the Android applications.
Versions 16 and later
Universal Windows 10 App This type of control is now available for the Windows Phone applications.
WINDEVLinux This type of control is now available for the WINDEV applications in Linux.
New in version 16
Universal Windows 10 App This type of control is now available for the Windows Phone applications.
WINDEVLinux This type of control is now available for the WINDEV applications in Linux.
Universal Windows 10 App This type of control is now available for the Windows Phone applications.
WINDEVLinux This type of control is now available for the WINDEV applications in Linux.
Versions 17 and later
iPhone/iPad This type of control is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This type of control is now available for the iPhone/iPad applications.
iPhone/iPad This type of control is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This type of control is now available for the Android Widget windows.
Universal Windows 10 App This type of control is now available for the applications in Windows Store apps mode.
New in version 18
Android Widget This type of control is now available for the Android Widget windows.
Universal Windows 10 App This type of control is now available for the applications in Windows Store apps mode.
Android Widget This type of control is now available for the Android Widget windows.
Universal Windows 10 App This type of control is now available for the applications in Windows Store apps mode.
Creating a Static control
WINDEVAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJava

Create a Static control in a window or in a report

To create a Static control in a window or in a report:
  1. In the window or report editor, click Static . You also have the ability to select:
    • "Insert .. Control .. Static" in the window editor.
    • "Insert .. New control .. Static" in the report editor.
    On the "Creation" pane, in the "Usual controls" group, click Static .
  2. Click the position where the control will be created in the window or report. The control appears in creation mode.
To display the control characteristics, select "Description" from the popup menu of control. You can for example type the text displayed in the control.
Notes:
  • AndroidAndroid Widget Universal Windows 10 AppJava The reports are not available.
  • Versions 19 and later
    WINDEV The multiline Static controls support the ellipse: if the text is too long to fit in its static control, the end of the text is represented by three dots. The ellipsis management is defined in the "Details" tab of Static control.
    New in version 19
    WINDEV The multiline Static controls support the ellipse: if the text is too long to fit in its static control, the end of the text is represented by three dots. The ellipsis management is defined in the "Details" tab of Static control.
    WINDEV The multiline Static controls support the ellipse: if the text is too long to fit in its static control, the end of the text is represented by three dots. The ellipsis management is defined in the "Details" tab of Static control.
  • Versions 21 and later
    WINDEV The multiline Static controls can be justified ("Horizontal alignment: Justified").
    New in version 21
    WINDEV The multiline Static controls can be justified ("Horizontal alignment: Justified").
    WINDEV The multiline Static controls can be justified ("Horizontal alignment: Justified").
WINDEVAndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 AppJava

Create a Static control in a window or in a report

To create a Static control in a window:
  1. On the "Creation" pane, in the "Usual controls" group, click Static .
  2. Click the position where the control will be created in the window. The control appears in creation mode.
To create a Static control in a report:
  1. On the "Creation" pane, in the "Text" group, click Static .
  2. Click the position where the control will be created in the report. The control appears in creation mode.
To display the control characteristics, select "Description" from the popup menu of control. You can for example type the text displayed in the control or define the type of information displayed in the control.
Notes:
  • AndroidAndroid Widget Universal Windows 10 AppJava The reports are not available.
  • Versions 19 and later
    WINDEV In a window, the multiline Static controls that can manage the ellipsis: if the text is too long to fit in its static control, the end of the text is represented by three dots. The ellipsis management is defined in the "Details" tab of Static control.
    New in version 19
    WINDEV In a window, the multiline Static controls that can manage the ellipsis: if the text is too long to fit in its static control, the end of the text is represented by three dots. The ellipsis management is defined in the "Details" tab of Static control.
    WINDEV In a window, the multiline Static controls that can manage the ellipsis: if the text is too long to fit in its static control, the end of the text is represented by three dots. The ellipsis management is defined in the "Details" tab of Static control.
  • Versions 21 and later
    WINDEV In a window, the multiline Static controls can be justified ("Horizontal alignment: Justified").
    New in version 21
    WINDEV In a window, the multiline Static controls can be justified ("Horizontal alignment: Justified").
    WINDEV In a window, the multiline Static controls can be justified ("Horizontal alignment: Justified").
WINDEVJava

Creating a Static control in RTF format in a window

To create a Static control in RTF format in a window:
  1. In the window editor, click Static (or select "Insert .. Control .. Static").On the "Creation" pane, in the "Usual controls" group, click Static .
  2. Display the description window of control ("Description" from the popup menu).
  3. In the "Details" tab, select "Text with formatting (RTF)".
  4. In the "General" tab, type the text of static in RTF format: a specific toolbar is automatically displayed, allowing you to format the text.
Notes:
  • An RTF static control can also be created via a cut/paste operation of a RTF text in the window.
  • To use a static control in RTF format, the "RICHED20.DLL" file must be found on the current computer. In most cases, the "RICHED20.DLL" file is found in the system directory of Windows.
  • Versions 16 and later
    You also have the ability to use ..RichEdit to modify the RTF type of a Static control by programming.
    New in version 16
    You also have the ability to use ..RichEdit to modify the RTF type of a Static control by programming.
    You also have the ability to use ..RichEdit to modify the RTF type of a Static control by programming.
WEBDEV - Server codePHP

Creating a Static control in a page

To create a Static control in a page:
  1. In the page editor, click:
    • Static (or select "Insert .. Control .. Static") to create a simple Static control.
    • HTML static (or select "Insert .. Control .. HTML static") to create an HTML Static control.
    On the "Creation" pane, in the "Usual controls" group, click Static .On the "Creation" pane, in the "Usual controls" group, expand "Text" and select "Static".
    Static
  2. Click the position where the control will be created in the page. The control appears in creation mode.
To display the control characteristics, select "Description" from the popup menu of control.
To create an HTML Static control in a page:
  1. On the "Creation" pane, in the "Usual controls" group, expand "Static".On the "Creation" pane, in the "Usual controls" group, expand "Text".
  2. Select "HTML static (Compatible)".
  3. Click the position where the control will be created in the page. The control appears in creation mode.
Versions 19 and later
Note: We advise you to replace the HTML Static control by the Rich Text Area control.
New in version 19
Note: We advise you to replace the HTML Static control by the Rich Text Area control.
Note: We advise you to replace the HTML Static control by the Rich Text Area control.
WINDEVWEBDEV - Server codeWindows Mobile

Transforming a "Static" control into an "RTF" control (report editor)

To display text in RTF format in a "Static" control, check "RTF format" in the "Details" tab of the control description.
The "Static" control becomes an "RTF" control. All the characteristics of the "Static" control are kept. See RTF control for more details.
Handling a Static control

Typing the text of Static control

To type the text of Static control:
  1. Click the Static control in the editor. The input cursor is displayed.
  2. Type the text of Static control.
WINDEVWEBDEV - Server code For the HTML or RTF static controls, each element can be formatted via a toolbar.
WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadWindows Mobile

Modifying a Static control in the report editor

Two methods are available:
  • Method 1:
    1. Select the control. The selection handles appear around the control.
    2. Click the control again. The mouse cursor turns into an input cursor.
    3. Type the new caption of control.
    4. Modify (if necessary) the formatting via the formatting toolbar.
    5. As soon as a click is performed outside the control, the control switches back to read-only.
    Method 1:
    1. Select the control. The selection handles appear around the control.
    2. Click the control again. The mouse cursor turns into an input cursor.
    3. Type the new caption of control. As soon as a click is performed outside the control, the control switches back to read-only.
      Note: The formatting in the report editor can be performed via the ribbon directly: on the "Modification" pane, use the options of "Fast edit" group.
  • Method 2:
    1. Select the control.
    2. Display the description window of control ("Description" from the popup menu).
    3. Type the new caption in each language supported by the control.
    4. Modify (if necessary) the formatting in the "Style" tab.Modify (if necessary) the formatting in the "Style" tab.
      Note: The formatting in the report editor can be performed via the ribbon directly: on the "Modification" pane, use the options of "Fast edit" group.
WINDEVWEBDEV - Server codeiPhone/iPadWindows Mobile

Content of Static control (report editor)

  • The character string displayed in the Static control can contain the value of an item printed in the report. To insert the value of a report item or control into the text, the name of item or control must be typed between [% and %] characters.
    For example, the caption of the control can correspond to:
    The [%SupplierName%] supplier sells the [%ProductName%] product at [%PriceIOT%] .
    The SupplierName, ProductName and PriceIOT items will be replaced by their value when printing the report.
  • This caption can be typed on several lines. In this case, the control must be a multiline control and its size must be large enough.
    Note: If an orientation angle is applied to a multiline control, the automatic CR characters are ignored. Only the manual CR characters are taken into account.
Reminder: The "Auto-sizable" option is used to automatically increase the size of the control according to its content.
Notes
  • The content of a Static control can be typed in the editor or defined by programming.
  • A Static control can be linked to an item of a data file. In this case, the control is used to view the content of the items found in the data file.
  • WEBDEV - Server code To display numeric data (amount, date, time, ...), use the formatted display control: the data will be displayed according to the selected input mask.
  • WEBDEV - Server code To define an anchor on a Static control:
    1. Display the description window of the control.
    2. In the "General" tab, check "Define as anchor".
    3. Validate.
  • Versions 15 and later
    WINDEVAndroidWindows Mobile In the windows, the Static controls include a display mask in order to automatically format the data assigned to them. This mask can be modified by programming with ..InputMask.
    New in version 15
    WINDEVAndroidWindows Mobile In the windows, the Static controls include a display mask in order to automatically format the data assigned to them. This mask can be modified by programming with ..InputMask.
    WINDEVAndroidWindows Mobile In the windows, the Static controls include a display mask in order to automatically format the data assigned to them. This mask can be modified by programming with ..InputMask.
Related Examples:
The Static control Unit examples (WINDEV): The Static control
[ + ] Using a Static control
Management of RTF Unit examples (WINDEV): Management of RTF
[ + ] Using the main functions for RTF management in a WINDEV application:
- Load a file in RTF format
- Save a file in RTF format
- Find and select a word in an RTF text
- Display a text in RTF format
- Modify the characteristics of a selection (font, case, color, ...)
HTMLClass property Unit examples (WEBDEV): HTMLClass property
[ + ] The property ..HTMLClass allows you to read and update the control's HTML attribute "class".
This property lets you select the CSS Style applied on the control.
WW_CloudTags Sample components (WEBDEV): WW_CloudTags
[ + ] This example explains how to display a cloud of tags in a dynamic WEBDEV application.
Indeed, on Internet, a site page responds more or less to a set of keywords.
The purpose of this example is to explain how to display the keywords of a site in an area of the page by indicating the important keywords graphically.
The keywords are represented as links of different sizes: the more important the keyword is, the larger the font is.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment