cs_andrebernard
Messages postés404Date d'inscriptionlundi 9 juin 2003StatutMembreDernière intervention 4 septembre 2013
-
3 sept. 2007 à 17:26
cs_andrebernard
Messages postés404Date d'inscriptionlundi 9 juin 2003StatutMembreDernière intervention 4 septembre 2013
-
4 sept. 2007 à 09:09
Bonjour à tous
Je voudrais faire un richeditbox dans lequel les caracteres varie selon la taille de la fenetre qui le contient.
ça marche tres bien mais quand je resize la fenetre le texte que j'avais ecris en vert redeviens noir et donc disparait sur mon fond noir
Private Sub Form_Load()
RichTextBox1.Width = Form1.Width
RichTextBox1.Height = Form1.Height
End Sub
Private Sub Form_Resize()
RichTextBox1.Font.Size = Int(Form1.Width / 400)
RichTextBox1.Width = Form1.Width
RichTextBox1.Height = Form1.Height
RichTextBox1.SelColor = &HC000&
End Sub
cs_andrebernard
Messages postés404Date d'inscriptionlundi 9 juin 2003StatutMembreDernière intervention 4 septembre 20131 4 sept. 2007 à 09:09
Bonjour CASY
Merci ça marche nickel.
Par contre j'avais encore un petit soucis, c'est que du coup quand on resizait la fenetre le curseur se remttait au debut et ne gardait pas sa place d'origine.
Grace à ton code que j'ai compris, j' ai un peu modifié pour que le curseur reste ou il est
Merci beaucoup
Private Sub Form_Resize()
rtf.Font.Size = Int(frmDoc.Width / 400)
rtf.Width = frmDoc.Width
rtf.Height = frmDoc.Height
rtf.SelStart = 0
rtf.SelLength = Len(rtf.Text)
rtf.SelColor = &HC000&
rtf.SelStart = Len(rtf.Text)
End Sub