PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Overview of Static control
  • Control in a window, in a page (static or dynamic) or in a report
  • Creating a Static control
  • Creating a Static control in a page
  • 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 apply effects to the displayed text, you have the ability to use:
    Remarks:
    • 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 16 and later
    Linux This type of control is now available for WINDEV applications in Linux.
    New in version 16
    Linux This type of control is now available for WINDEV applications in Linux.
    Linux This type of control is now available for WINDEV applications in Linux.
    Creating a Static control
    1. Open the control description window ("Description" from the popup menu).
    2. In the "Details" tab, select "Text with formatting (R.T.F.)".
    3. In the "General" tab, enter the text of the control in RTF: a specific toolbar is automatically displayed, allowing you to format the text.
    Remarks:
    • An RTF Static control can also be created by pasting RTF text directly in the window.
    • To use a Static control in RTF format, the "RICHED20.DLL" file must be on the current computer. In most cases, the "RICHED20.DLL" file is in the Windows system directory.
    • 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. On the "Creation" pane, in the "Usual controls" group, expand "Text" and select "Simple static".
      Static
    2. Click where you want to create the control in the page. The control appears in the editor.
    To view the control characteristics, select "Description" in the popup menu of the control.
    Handling a Static control

    Typing the text of Static control

    To type text in the Static control:
    1. Click the Static control in the editor. The input cursor is displayed.
    2. Type the text of Static control.
    WEBDEV - Server code For HTML or RTF Static controls, the format of each element can be defined via a toolbar.
    WEBDEV - Server code

    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 text of the control. As soon as you click outside the control, it switches back to read-only.
        Remark: You can format text in the report editor directly from the ribbon: on the "Modification" pane, use the options in the "Quick edit" group.
    • Method 2:
      1. Select the control.
      2. Open the control description window ("Description" from the popup menu).
      3. Enter the new text in each language supported by the control.
      4. Modify (if necessary) the formatting in the "Style" tab.
        Remark: You can format text in the report editor directly from the ribbon: on the "Modification" pane, use the options in the "Quick edit" group.
    WEBDEV - Server code

    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 an item or a control of the report into the text of the Static 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%].
      The SupplierName, ProductName and PriceIOT items will be replaced by their value when printing the report.
    • Text can span multiple lines. In this case, the control must be a multiline control and its size must be large enough.
      Remark: 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-resizing" option is used to automatically increase the control size 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 in the data file.
    • WEBDEV - Server code To display numeric data (amount, date, time, etc.), 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. Open the control description window.
      2. In the "UI" tab, select "Define as anchor".
      3. Validate.
    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 version required
    • Version 9
    This page is also available for…
    Comments
    Click [Add] to post a comment