hi friend,
how to add new line char after each 50 char in rich text box?
can anyone help to my issue....
Thanks & Regards,
priya.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sam HobbsPosted Mar 31, 2010, 11:53 AM
Use of symbolic names such as Environment.NewLine is good programming, but the CrLf combination is very standard.
SamPosted Mar 31, 2010, 3:17 AM
Amit ChoudharyPosted Mar 16, 2010, 7:19 AM
OntextChanged event of your rich text box write following code:
{
{
{
Please mark the answer if it helps you.
Hirendra SisodiyaPosted Mar 16, 2010, 6:51 AM
you can apply this code in text changed event of rich textbox like as :
Private Sub RichTextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged
If RichTextBox1.Text.Length Mod 50 = 0 Then
RichTextBox1.AppendText(Environment.NewLine)
End If
End Sub
thanks
please check as answere if you like this answere