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.
ATTENTION: This type corresponds to the property Texte of a diagShape or diagSelection type variable..
Example
// Create a rectangle shape
MyShape is diagRectangle

// Set the dimensions, position and background color
MyShape.X = 100
MyShape.Y = 100
MyShape.Width = 350
MyShape.Height = 150
MyShape.Background.Color = PastelRed
// Text 
MyShape.Text.Caption = "Rectangle"
MyShape.Text.HorizontalAlignment = haCenter
MyShape.Text.VerticalAlignment = vaMiddle
MyShape.Text.Color = Gold
MyShape.Text.Font.Bold = True

// Reference the displayed diagram
MyDiagram is Diagram <- DIAGEDT_MyDiagram

// Add the rectangle shape to the diagram
Add(MyDiagram.Shape, MyShape)
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 at the same time as the property 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 centred.
  • 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.
  • cvHaut: Text is placed at the top of the form.
  • cvMilieu: Text is placed in the middle of the shape.
Minimum version required
  • Version 27
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/30/2024

Send a report | Local help