ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
  • Selection in a Word Processing control
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
The property Selection property displays the characteristics of the selection (or cursor):
  • WINDEV in a Word Processing control.
    Note: This selection is located in the part being edited (body, header or footer).
  • WINDEV in a Spreadsheet control.
  • WINDEV in an HTML Editor control
  • in a Diagram Editor control.
Example
WINDEV
// Récupération du fragment sélectionné par l'utilisateur
MaSélection is docFragment = TT_Doc.Sélection.Fragment
// Mise en gras de la sélection de l'utilisateur
MaSélection.Formatting.FontBold = True
// Récupération de la première section du texte sélectionné par l'utilisateur
MaSection1 is docSection = TT_Doc.Sélection.Section[1]
// Obtenir la sélection dans un champ Editeur de diagrammes
MaSélection is diagSelection <- EDIAG_MonDiagramme.Sélection
IF MaSélection.Shape.Count > 0 THEN
	// Obtenir les formes
	FOR EACH stForme OF MaSélection.Shape
		LIB_INFO_SELECTION = "Sélection de " + stForme.Nom + 
		" [ " + stForme.X + ", " + stForme.Y + " - " + stForme.Largeur + 
		"x" + stForme.Hauteur + " ]"
	END
ELSE
	LIB_INFO_SELECTION = "Cliquez sur une forme dans le diagramme pour connaître la sélection"
END
Syntax
WINDEV

Retrieving the properties of the selection in a Word Processing control Hide the details

<Result> = <Word Processing control>.Selection.<Property>
<Result>: Type corresponding to the property used
Expected result (see "Remarks").
<Word Processing control>: Control name
Name of the Word Processing control.
<Property>:
Property to use on the selection (see Remarks).
WINDEV

Retrieving the properties of the selection in a Spreadsheet control Hide the details

<Result> = <Spreadsheet control>.selection
<Result>: psheetSelection variable
psheetSelection variable describing the selection.
<Spreadsheet control>: Control name
Name of Spreadsheet control.
WINDEV

Retrieving the properties of the selection in an HTML Editor control Hide the details

<Result> = <HTML Editor control>.selection
<Result>: edtHTMLSelection variable
edtHTMLSelection variable describing the selection.
<HTML Editor control>: Control name
Name of the HTML Editor control.

Retrieving the properties of the selection in a Diagram Editor control Hide the details

<Result> = <Diagram Editor control>.selection
<Result>: diagSelection variable
diagSelection variable describing the selection.
<Diagram Editor control>: Control name
Name of the Diagram Editor control.
Remarks
WINDEV

Selection in a Word Processing control

PropertyExplanations
Fragment<Result> corresponds to a docFragment variable containing the characteristics of selected fragment.
Example: <Result> = <Word Processing control>.Selection.Fragment
Section[X]Used to get the section associated with the selection.
  • X corresponds to the number of section to get.
  • <Result> corresponds to a docSection variable containing the characteristics of the section associated with the selection.
Example: <Résultat> = <Champ Traitement de texte>.Selection.Section[1]
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/14/2025

Send a report | Local help