ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / Various properties
  • Font of report controls
  • Fonts of page controls
  • Limitations
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The Font property is used to
  • Get the identifier of the font used in a control in a report, page or window.
  • Change the font used in a control in a report, page or window.
Example
WINDEVWEBDEV - Server codeiPhone/iPadIOS Widget
MyFont is Font
MyFont = FontCreate("Arial", 12, iBold)
EDT_Address.Font = MyFont
// Define the characteristics of a Font variable
Font1 is Font
Font1.Name = "Arial"
Font1.Color = LightYellow
Font1.Size = 14
Font1.SizeUnit = unitPoint
Font1.Orientation = 45
// Apply the font to "MyControl"
MyControl.Font = Font1
Syntax

Getting the font used in a control Hide the details

<Result> = <Control used>.Font
<Result>: Font
Font variable containing the characteristics of the font used in the specified control.
<Control used>: Control name
Name of the control to be used.

Changing the font used in a control Hide the details

<Control used>.Font = <New font>
<Control used>: Control name
Name of the control to be used.
<New font>: Font
Font variable containing the characteristics of the new font to be used in the specified control. The font characteristics have been defined with FontCreate or via the font properties.
Remarks

Font of report controls

To handle the fonts used in the controls of a report, use the following properties:
AndroidAndroid Widget The properties are not available.
WEBDEV - Server code

Fonts of page controls

We recommend that you use a series of fonts separated by commas as font name. For example: "Arial, Helvetica, Sans-serif", "Time New Roman, Times, Serif", etc.
The Font property cannot be used to get or change the CSS sizes in addition to the absolute sizes. For more details, see the help page on the FontSize property.

Limitations

WINDEVWEBDEV - Server codeReports and QueriesUniversal Windows 10 AppiPhone/iPad In a report, the Font property can be used on:
  • a Static control.
  • a Calculated control.
  • a Link control.
  • a Preset control.
  • an Edit control.
In a window or page, the Font property can be used on:
  • a Static control,
  • an Edit control,
  • a Button control,
  • a Check Box control,
  • a Radio Button control,
  • a List Box control,
  • a row in a List Box, ListView or Combo Box control,
  • a Table control,
  • a TreeView Table control,
  • a table cell,
    WEBDEV - Server code This property is available in read-only mode.
  • a table column,
  • a formatted display control,
  • an HTML control,
  • a Combo Box control,
  • a Link control,
  • an HTML Static control,
  • a Pager control,
  • a Breadcrumb control,
  • a TreeView control,
  • a Menu control,
  • a cell in a status bar.
AndroidAndroid Widget The Font property can be used on:
  • a Button control,
  • a Static control,
  • an Edit control,
  • a column in a Table control,
  • a row in a List Box, Table or Combo Box control,
  • a resource in a Scheduler control.
This property is not available for controls in a report.
Related Examples:
Font property Unit examples (WEBDEV): Font property
[ + ] This example presents the use of the..Font properties and the use of the FontCreate function.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/23/2023

Send a report | Local help