PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

This content has been translated automatically. Click here to view the French version.
  • Font variable
  • Number of characters
  • Multiline edit control
  • Control with input mask
  • Limits
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
The Size property is used to determine and change the size of an element.
This property can be used to find out and modify:
  • the size (in picas) of a Font variable.
    Remark: the font name must correspond to one of the fonts installed on the current computer. The font size is set to 12 by default.
  • the maximum number of characters found in:
    • a window control (edit control, table column or editable combo box)
    • a page control (edit control)
    • a Static control in a report.
      Remark: The maximum number of characters found in a control is defined in the "General" tab of the control description.
  • the maximum size of a text item (character string, text memo, character) defined in the data model editor or by programming.
  • the maximum size of a Time item defined in the data model editor or by programming.
This property can also be used to find out:
  • the number of columns in a Table control.
  • Versions 16 and later
    WEBDEV - Server codePHP the maximum number of characters in a Captcha control.
    New in version 16
    WEBDEV - Server codePHP the maximum number of characters in a Captcha control.
    WEBDEV - Server codePHP the maximum number of characters in a Captcha control.
Versions 16 and later
PHP This property is available in PHP only for Captcha controls.
New in version 16
PHP This property is available in PHP only for Captcha controls.
PHP This property is available in PHP only for Captcha controls.
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
// Définir le nombre maximum de caractères contenus dans la rubrique "AdresseLiv"
AdresseLiv.Taille = 50
...
// Définir le nombre maximum de caractères contenus dans la rubrique "HeureLiv"
HeureLiv.Taille = 6 // Format HHMMSS
...
// Valide la description du fichier de données
HDescribeFile(Client)
// Modifier le nombre maximum de caractères contenus dans le champ "SAI_Nom"
SAI_Nom.Taille = 25
WEBDEV - Server codeAjax
// Définir les caractéristiques d'une variable de type Police
Police1 is Font
Police1.Name = "Arial"
Police1.Size = 14
Police1.Orientation = 45
// Appliquer la police au champ "MonChamp"
MyControl.Police = Police1
Syntax

Finding out the size of a Font variable, the maximum number of characters found in a control Hide the details

<Result> = <Element to use>.Size
<Result>: Integer
  • Size (in picas) of the specified font.
  • Maximum number of characters found in the specified control or 0 if the specified control has no limit.
  • Number of table columns if the specified control is a table.
<Element to use>: Optional Font variable or name of control
  • Name of the Font variable to use.
  • Name of control to use

Modifying the size of a Font variable, the maximum number of characters found in a control Hide the details

<Element to use>.Size = <New size>
<Element to use>: Optional Font variable or name of control
  • Name of the Font variable to use.
  • Name of control to use.
<New size>: Integer
  • New size (in picas) for the specified font.
  • Maximum number of characters found in the specified control or 0 if the specified control has no limit.
Remark: The number of columns found in a Table control cannot be modified.

Finding out the size of an item Hide the details

<Result> = <Data file>.<Item>.Size
<Result>: Integer
  • Maximum number of characters supported by the specified item,
  • 0 for the memos.
<Data file>: Character string (with or without quotes)
Name of data file used. This name was defined in the data model editor or by the File description type.
<Item>: Character string (with or without quotes)
Name of the item used. This name was defined in the data model editor or by the Item description type.
If this item is a text item, number of characters in the item.
If this item is a time item, the number of characters is used to identify the item format:
Number of characters
in the Time item
Format of Time item
2HH
4HHMM
6HHMMSS
8HHMMSSCC
9HHMMSSCCC
WEBDEV - Server codeAjax

Defining the size (number of characters) of an item described by programming Hide the details

<Item>.Size = <Number of characters>
<Item>: Character string (with or without quotes)
Name of the item used. This name was defined by the Item description type.
If this item is a text item, number of characters in the item.
If this item is a time item, the number of characters is used to identify the item format:
Number of characters in the Time itemFormat of Time item
2HH
4HHMM
6HHMMSS
8HHMMSSCC
9HHMMSSCCC
<Number of characters>: Integer
New maximum number of characters supported by the specified item.
Remarks
WEBDEV - Server codeAjax

Font variable

A font can be created from a Font variable.
To define the font characteristics, use:
This font can be used:

Number of characters

If the maximum number of characters that was specified is less than the number of characters currently found in the control:
  • The content of the control is not modified on the screen.
  • The value of the control includes all the characters displayed in the control.

Multiline edit control

If the maximum number of characters in a multiline edit control is modified with the Sizeproperty, it will be possible to assign by programming a text using a number of characters higher than the one defined. For example:
// "SAI_Adresse" est un champ de saisie multiligne
SAI_Adresse.Taille = 5
SAI_Adresse = "ABCDEFGHI"
// "SAI_Adresse" contient "ABCDEFGHI"

Control with input mask

The Size property must not be used to change the maximum number of characters in controls with an input mask. Indeed, the maximum number of characters found in the control depends on the input mask defined for this control.

Limits

In HFSQL data files, the Size property applies only to text and time items.
In a report, the Size property can only be used on Static controls.
WEBDEV - Server code In a page, the Size property (in read-only mode) applies only to:
  • edit controls,
  • tables.
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment