ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Diagram editor functions / Types of variables
  • Properties specific to diagText variables
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
diagText (Type of variable)
In french: diagTexte
The diagText type is used to define all the advanced characteristics of a text associated with a shape in a diagram. The characteristics of this text 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.
CAUTION: This type corresponds to the Text property of a variable of type diagShape or diagSelection.
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.
Remark: Do not use this property along with the CaptionHTML property.
CaptionHTMLCharacter stringText displayed in HTML format. This text can contain HTML formatting tags.
Remark: Do not use this property along with the Caption property.
ColorColorText color.
FontFontFont characteristics: bold, italic, etc.
HorizontalAlignmentInteger constantHorizontal text alignment:
  • haCenter: The text is centered.
  • haRight: The text is aligned to the right.
  • haLeft: The text is aligned to the left.
MarginRealMargin around the text, expressed in pixels.
VerticalAlignmentInteger constantVertical text alignment:
  • vaBottom: The text is placed at the bottom of the shape.
  • vaTop: The text is placed at the top of the shape.
  • vaMiddle: The text is placed in the center of the shape.
Minimum version required
  • Version 27
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/23/2023

Send a report | Local help