ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Word Processing functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Finds a character string in an entire Word Processing control.
Example
tabFragments is array of docFragment = TT_MonDocument.Recherche("%NomClient%")
// Remplacement de tous les "%NomClient%" par le nom du client
FOR EACH f OF tabFragments
	f.Texte = Client.Nom
END
// Recherche du mot "BEAUGRAND" dans le texte 
// Sélectionne uniquement le premier trouvé pour changer sa couleur
tabFragments is array of docFragment = TT_SansNom1.Recherche("BEAUGRAND")

IF tabFragments.Count >= 1 THEN
	// Positionnement du curseur au début du premier mot trouvé
	TT_SansNom1.Curseur = tabFragments[1].StartPosition
	// Calcul de la longueur de la sélection
	TT_SansNom1.LongueurSélection = ...
				tabFragments[1].EndPosition - tabFragments[1].StartPosition+1
	// Modification de la couleur du texte
	tabFragments[1].Formatting.TextColor = PastelRed
	BREAK
END
Syntax
<Result> = <Word Processing control>.Search(<Text to find> [, <Options>])
<Result>: Array of docFragment variables
Array of docFragment variables corresponding to all the document fragments where the searched text was found.
<Word Processing control>: Control name
Name of the Word Processing control to use.
<Text to find>: Character string
Text to find in the control.
<Options>: Optional constant (or combination of constants)
Search options:
IgnoreCaseCase and accent insensitive search (ignores uppercase and lowercase differences).
WholeWordWhole word search (enclosed in punctuation characters or spaces).

By default, the search is case sensitive: the text searched for must have the same case as the text to be found. To perform a case-insensitive search, use the IgnoreCase constant.
Business / UI classification: UI Code
Component: wd300mdl.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/24/2024

Send a report | Local help