Changing the ToolStripStatus value while typing in the RichTextBox

0

I'm developing a text editor just to practice.

But I came across a little problem, I would like that while the user is typing, the value of the ToolStripStatus that by default is 'READY', wanted to change while typing 'READY' TO 'DIGITING ...'

Can you help me?

    
asked by anonymous 27.06.2017 / 18:25

1 answer

2

You will need:

1-RichTextBox: richTextBox1

1-ToolStripStatusLabel: toolStripStatusLabel1

1-Timer: timer1 , with interval of 300ms

Use the TextChanged event of richTextBox1 :

 private void richTextBox1_TextChanged(object sender, EventArgs e)
 {
            toolStripStatusLabel1.Text = "Digitando...";
            timer1.Enabled = false;
            timer1.Enabled = true;
 }

Use the Tick event of timer1 :

  private void timer1_Tick(object sender, EventArgs e)
  {
        timer1.Enabled = false;
        toolStripStatusLabel1.Text = "Pronto!";
  }
    
27.06.2017 / 18:38