kiboumz
Messages postés120Date d'inscriptionmercredi 17 septembre 2003StatutMembreDernière intervention18 mai 2007
-
26 mai 2006 à 20:54
kiboumz
Messages postés120Date d'inscriptionmercredi 17 septembre 2003StatutMembreDernière intervention18 mai 2007
-
29 mai 2006 à 19:25
Bonjour,
j'essaie de faire dans mon programme une fonction de recherche qui sélectionne (highlight), dans le richtextbox, le texte recherché, mais je n'y arrive pas.
J'ai ceci :
int Position = richtxtboxDocument.Text.IndexOf(txtboxRechercher.Text);
if (Position != -1)
{
richtxtboxDocument.SelectionStart = Position;
richtxtboxDocument.SelectionLength = txtboxRechercher.Text.Length;
}