Help / WLanguage / WLanguage functions / Controls, pages and windows / Token management functions
  • Properties specific to Token variables
  • Handling tokens
  • Functions that use the Token type
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
The Token type is used to define all the advanced characteristics of a token displayed in an edit control. The characteristics of this token can be defined and changed using different WLanguage properties.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
// Add a token to an Edit control
MyToken is Token
MyToken.Caption = Customer.Name
MyToken.Value = Customer.IdCustomer
EditAddToken(EDT_Customer, MyToken)
// Modify the background color of a token
FOR EACH MyToken OF EDT_Customer.Token
IF MyToken.Value = Customer.IdCustomer THEN
MyToken.BackgroundColor = LightRed

Properties specific to Token variables

The following properties can be used to handle a token:
Property nameType usedEffect
BackgroundColorColor variableBackground color of the token.
CaptionCharacter stringCaption of the token as it will be displayed in the Edit control. If this property is not specified, the caption of the token will correspond to its stored value.
Character stringHTML code of the token caption as it will be displayed in the Edit control. If this property is not specified, the caption specified with the Caption property is used.
ColorColor variableColor of the token text.
New in version 28
Character stringStored value of the token. Stores any type of value.
TooltipCharacter stringTooltip displayed when hovering over the token.
ValueCharacter stringValue of the token.

Handling tokens

  • To handle the tokens of an Edit control, it is possible to use:
  • You can use VariableReset to reset the content of a Token variable.

Functions that use the Token type

The following functions handle Token variables:
EditAddTokenAdds a token to a "Text token" Edit control.
EditInsertTokenInserts a token into a "Text token" Edit control.
Minimum version required
  • Version 24
This page is also available for…
Click [Add] to post a comment

Last update: 01/26/2023

Send a report | Local help