ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Static Text control
  • Static Text control overview
  • Control in a window, in a page (static or dynamic) or in a report
  • Creating a Static Text control in a window or page
  • Creating a Static Text control in a window or page
  • Handling long text
  • Creating a Static Text control in a report
  • Creating a Static Text control in a report
  • Content of Static Text control
  • Entering text in a Static Text control in the editor
  • Content of Static Text control (report editor)
  • Notes
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Static Text control overview

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

A Static Text control is a control used to display a static text. The content of the control cannot be entered by the user.
To apply effects to the displayed text, you have the ability to use:
    Creating a Static Text control in a window or page

    Creating a Static Text control in a window or page

    To create a Static Text control in a window or page:
    1. On the "Creation" tab, in the "Usual controls" group, click Static Text.
    2. Click where you want to create the control in the window or page. The control appears in the editor.
    To view the characteristics of the control, select "Description" in the context menu. You can type text in the control or define the type of information that will be displayed.

    Handling long text

    If the text is too long, there are several possible solutions:
    • Display an ellipsis: You can use an ellipsis.. Ellipses (three consecutive dots) replace excessively long text.
      • WEBDEV - Server codePHP In a page, text can only be truncated at the end, and the omitted words are replaced with three dots. The "Truncate with an ellipsis at the end" option can be found in the "UI" tab of the control description window.
    Creating a Static Text control in a report
    WEBDEV - Server code

    Creating a Static Text control in a report

    To create a Static Text control in a report:
    1. On the "Creation" tab, in the "Text" group, click Static Text.
    2. Click where you want to create the control. The control appears in the editor.
    To view the characteristics of the control, select "Description" in the context menu. You can type text in the control or define the type of information that will be displayed. For more details on the characteristics of controls in reports, see Modifying the characteristics of report controls.
    Notes: The "UI" tab of the Static Text control description in the report editor allows you to manage numerous options, including ellipsis, conditional display, etc.
    Content of Static Text control
    Static Text controls can display information:
    • entered in the editor.
    • defined programmatically.
    • from a data file. In this case, the Static Text control is bound to a data file item. In this case, the control is used to view the content of the items in the data file.

    Entering text in a Static Text control in the editor

    To type the text of the Static Text control:
    1. Click the Static Text control in the editor. The input cursor is displayed.
    2. Type the text of the Static Text control.
    Note: You can also edit the text in a Static Text control from the control description window.
    WEBDEV - Server code

    Content of Static Text control (report editor)

    • The character string displayed in the Static Text control can contain the value of an item printed in the report. To insert the value of an item or a control of the report into the text of the Static Text control, enter the name of the item or control between [% and %].
      For example, the text of the control can correspond to:
      The ]%SupplierName%[ supplier sells the ]%ProductName%[ product at ]%PriceIOT%[.
      SupplierName, ProductName and PriceIOT will be replaced with their value when the report is executed.
    • Text can span multiple lines. In this case, the control must be a multiline control and its size must be large enough.
      Note: If an angle is applied to a multiline control, automatic carriage returns are ignored. Only manual carriage returns are taken into account.
    Reminder: The "Auto-resizing" option automatically resizes the control according to its content.
    Notes
    • WEBDEV - Server code To display numeric data (amount, date, time, etc.), use a formatted display control. An input mask will be applied to the data.
    • WEBDEV - Server code To define an anchor on a Static Text control:
      1. Open the control description window.
      2. On the "UI" tab, select "Define as anchor".
      3. Validate.
    Related Examples:
    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 version required
    • Version 9
    This page is also available for…
    Comments
    Click [Add] to post a comment

    Last update: 06/19/2025

    Send a report | Local help