- 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
- Handling a Static control
- Enter the text of the Static control
- Content of Static control (report editor)
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:
- The control style, by configuring the "Shadow" element.
- You can configure different effects for the Static control in the "Style" tab of the control description window. You can:
- set up the control framework. For example, this option allows you to display an image in a Static control.
The icon (to the right of the "Border" option) allows you to configure the shadow of the border. When the shadow is activated, it is possible to choose the X and Y offset of the shadow, the opacity percentage, the blur radius, the Color of the shadow.
- set the characteristics of the font used via the button. It is possible to indicate:
- line spacing,
- character spacing,
New in version 28 the angle corresponding to the orientation of the text.
Creating a Static control
Create a Static control in a window or in a report
To create a Static control in a window:
- On the "Creation" tab, in the "Usual controls" group, click .
- Click at the desired location to create the control. The control appears in the editor.
To create a Static control in a report:
- On the "Creation" tab, in the "Text" group, click .
- Click where the control will be created in the report. 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.
- Reports are not available.
Handling a Static control
Enter the text of the Static control
To enter the text of the Static control:
- Click the Static control in the editor. The input cursor is displayed.
- Type the text of the Static control.
Remark: The text of the Static control can also be edited in the control description window.
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%].
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.
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.
- The content of a Static control can be typed in the editor or defined through programming.
- A Static control can be bound to an item in a data file. In this case, the control is used to view the content of the items in the data file.
- In the windows, Static controls include a display mask to automatically apply a format to the data assigned to them. This mask can be modified programmatically with the InputMask property.
Unit examples (WINDEV): The Static control
Unit examples (WINDEV): Management of RTF
Unit examples (WEBDEV): HTMLClass property
Sample components (WEBDEV): WW_CloudTags
This page is also available for…