Ver Mensaje Individual
  #3 (permalink)  
Antiguo 25/02/2008, 08:24
ci2000
 
Fecha de Ingreso: abril-2005
Mensajes: 483
Antigüedad: 19 años, 1 mes
Puntos: 3
Re: No mantiene la negrita en un RichTextBox

Gracias por la respuesta, anduvo al pelo.

Ahora se me presentó este caso:

Código:
Private Sub Command1_Click()
 RichTextBox1.SelBold = True
 RichTextBox1.SetFocus
End Sub

Private Sub Command2_Click()
 RichTextBox1.SelStart = Len(RichTextBox1)
 SendKeys Chr(13)
 RichTextBox1.SetFocus
 RichTextBox1.Text = RichTextBox1.Text & "Nueva línea."
 RichTextBox1.SelStart = Len(RichTextBox1)
 RichTextBox1.SetFocus
End Sub

Private Sub Form_Load()
 Command1.Caption = "Negrita"
 Command2.Caption = "Nueva línea"
 RichTextBox1.Text = "Este texto es para probar"
End Sub
Necesito agregar el texto "Nueva línea" en el siguiente renglón y que me siga manteniendo las negritas. El caso es que al texto lo coloca a continuación del primer renglón y además me quita las negritas.

Gracias por las respuestas.
Saludos