ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Diagram editor functions / Types of variables
  • Properties specific to diagSelection 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
diagSelection (Type of variable)
In french: diagSélection
The diagSelection type is used to define all the advanced characteristics of a selection made in a diagram. The characteristics of this selection 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.
Example
// Retrieve the selected elements in a Diagram Editor control
MySelection is diagSélection <- DIAGEDT_MyDiagram.Selection
IF MySelection.Shape.Count > 0 THEN
// Get the shapes
FOR EACH stShape OF MySelection.Shape
STC_SELECTION_INFO = stShape.Name + "has been selected." +
" [ " + stShape.X + ", " + stShape.Y + " - " + stShape.Width +
"x" + stShape.Height + " ]"
END
ELSE
STC_SELECTION_INFO = "Click a shape in the diagram to get the selection"
END
Properties

Properties specific to diagSelection variables

The following properties can be used to handle a selection:
Property nameType usedEffect
AngleRealAngle of rotation of the selection.
Background
  • Background color of the selected shape,
  • -1 if no shape is selected or if multiple shapes are selected.
BorderdiagBorderCharacteristics of the border of the selected shape.
CommentCharacter stringComment associated with the selection.
HeightReal
  • Height of the selection, expressed in pixels,
  • -1 if no selection.
LinkdiagConnectorCharacteristics of the selected connector.
OpacityInteger
  • Opacity percentage of the selected shape. This value ranges from invisible (0) to completely opaque (100).
  • -1 if no shape is selected.
RoundReal
  • Curvature of the selected shape,
  • -1 if the shape has no rounded corners or if multiple shapes are selected.
ShadowBoolean
  • True if the shape has a shadow,
  • False otherwise.
ShapeArray of diagShapeShapes in the selection.
TextdiagTextCharacteristics of the text of the selected shape.
TypeInteger constantType of the selected element
WidthReal
  • Width of the selection, expressed in pixels,
  • -1 if no selection.
XReal
  • X-position of the box that contains the selection (expressed in pixels),
  • -1 if no selection.
YReal
  • Y-position of the box that contains the selection (expressed in pixels),
  • -1 if no selection.
ZOrderIntegerZ-order of the selection.
Related Examples:
The Diagram control Unit examples (WINDEV): The Diagram control
[ + ] Simplified use of a Diagram control
Minimum version required
  • Version 27
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/23/2023

Send a report | Local help