Bonjour a tous ! J'aimerais savoir comment aligner a gauche, a droite et au centre le text contenu dans un richTextBox et si cela est poosible pouvez vous me donner un exemple de code ou les fonctions adequates et comment les utiliser. Merci !![]()
Bonjour a tous ! J'aimerais savoir comment aligner a gauche, a droite et au centre le text contenu dans un richTextBox et si cela est poosible pouvez vous me donner un exemple de code ou les fonctions adequates et comment les utiliser. Merci !![]()
Salut,
Lorsque tu recherches des exemples de codes simples comme l'alignement d'un texte, remplissage de datatable, ...
Regarde par ici
Plasserre
http://plasserre.developpez.com/vsommair.htm
Microsoft
http://msdn2.microsoft.com/fr-fr/library/ms310242.aspx
Et biensur
http://dotnet.developpez.com/
Pour ta réponse
Membres RichTextBox
http://msdn.microsoft.com/library/fr...mberstopic.asp
Propriété RichTextBox.SelectionAlignment
http://msdn.microsoft.com/library/fr...nmenttopic.asp
Exemple
http://plasserre.developpez.com/v3-4.htm
Gwendal
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 Private Sub WriteCenteredTextToRichTextBox() ' Clear all text from the RichTextBox; richTextBox1.Clear() ' Set the foreground color of the text. richTextBox1.SelectionColor = Color.Red ' Set the alignment of the text that follows. richTextBox1.SelectionAlignment = HorizontalAlignment.Center ' Set the font for the text. richTextBox1.SelectionFont = new Font("Lucinda Console", 12) ' Set the text within the control. richTextBox1.SelectedText = "This text is centered using the SelectionAlignment property." End Sub
Partager