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 / Diagram Editor functions / Types of variables
  • Properties specific to diagText variables
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
diagText (Variable type)
In french: diagTexte
The diagText type is used to define all the advanced characteristics of a text associated with a shape in a diagram. You can define and change the characteristics of this text 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.
WARNING: This type corresponds to the property Text property of a diagShape or diagSelection type variable.
Example
// Crée une forme rectangle
MaForme is diagRectangle

// Définit les dimensions, la position et la couleur de fond
MaForme.X = 100
MaForme.Y = 100
MaForme.Width = 350
MaForme.Height = 150
MaForme.Background.Color = PastelRed
// Texte 
MaForme.Text.Caption = "Rectangle"
MaForme.Text.HorizontalAlignment = haCenter
MaForme.Text.VerticalAlignment = vaMiddle
MaForme.Text.Color = Gold
MaForme.Text.Font.Bold = True

// Obtient une référence sur le diagramme affiché
MonDiagramme is Diagram <- EDIAG_MonDiagramme

// Ajoute la forme rectangle dans le diagramme
Add(MonDiagramme.Shape, MaForme)
Properties

Properties specific to diagText variables

The following properties can be used to handle the text of a shape:
Property nameType usedEffect
BackgroundColorColorColor displayed behind the text.
CaptionCharacter stringText displayed.
Note: This property must not be used in conjunction with the LabelHTML.
CaptionHTMLCharacter stringText displayed in HTML format. This text can contain HTML formatting tags.
Note: This property must not be used in conjunction with the property label .
ColorColorText color.
FontFontFont characteristics: bold, italic, ...
HorizontalAlignmentInteger constantHorizontal text alignment:
  • chCentre Text is centered.
  • chRight Text is right-aligned.
  • chLeft Text is left-aligned.
MarginRealMargin around the text, expressed in pixels.
VerticalAlignmentInteger constantVertical text alignment:
  • cvBas: Text is placed at the bottom of the form.
  • cvTop: Text is placed at the top of the form.
  • cvMiddle Text is placed in the middle of the form.
Minimum version required
  • Version 27
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help