Change Toolstripstatus value while typing in Richtextbox

Asked

Viewed 19 times

0

I’m developing a little text editor just to practice.

inserir a descrição da imagem aqui

But I ran into a little problem, i wanted that while the user is typing, the value of Toolstripstatus that by default is 'READY', wanted to change while typing from 'READY' TO 'TYPING...'

Can you help me?

  • I believe it is a very unnecessary processing, but if you want it so I will post a code that can help

1 answer

2


You will need to:

1-Richtextbox: richTextBox1

1-Toolstripstatuslabel: toolStripStatusLabel1

1-Timer: timer1, with an interval of 300ms

Use the Textchanged event from richTextBox1:

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

Use the Tick event from timer1:

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.