0

Hello all,

I have a form that has a Timer and a label and a RichTextBox.
What I am trying to figure out is how to get the Label to say how many more characters are left in the TextBox.

Here is what I have.

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
	Label1.Text = (RichTextBox1.MaxLength)
End Sub

It does work w/ the max length but when I type it does not change.

Plz Help :)

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by Joshua Kidd
0

Use the _TextChanged event of the RichTextBox.

Private Sub RichTextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged
        Label1.Text = (RichTextBox1.MaxLength - RichTextBox1.TextLength).ToString
    End Sub
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.