ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Token functions
  • Properties specific to Token variables
  • Manipulating tokens
  • Functions that use the Token type
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Token (Variable type)
In french: Jeton
The Token type is used to define all the advanced characteristics of a token displayed in an edit control. You can define and change the characteristics of this token using different WLanguage properties.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Ajout d'un jeton dans un champ de saisie
MonJeton is Token 
MonJeton.Caption = Client.Nom
MonJeton.Value = Client.IdClient
EditAddToken(SAI_Client, MonJeton)

// Modification de la couleur de fond d'un jeton
FOR EACH MonJeton OF SAI_Client.Jeton
	IF MonJeton.Value = Client.IdClient THEN
		MonJeton.BackgroundColor = LightRed
	END
END
Properties

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 2025
Extra
VariantAllows you to store advanced information without affecting the execution of the application. You can store values of any type (array, etc.). It is also possible to add members to the Extra property.
Example:
MyVariable.Extra.Info1 = Value
MyVariable.Extra[Info2] = Value2
MyVariable.Extra.Date = DateSys()
StoredValueCharacter stringStored value of the token. Stores any type of value.
TooltipCharacter stringTooltip displayed when hovering over the token.
ValueCharacter stringToken value.
Remarks

Manipulating tokens

  • To manipulate the tokens of an Edit control, it is possible to use:
    • the token functions.
    • the Token property of the Edit control that returns an editable list containing all the tokens displayed in the control.
  • To reset the content of a Token variable, use VariableReset.

Functions that use the Token type

The following functions use 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…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help