C
C
CliverQwerty2018-06-04 15:11:23
C++ / C#
CliverQwerty, 2018-06-04 15:11:23

C# Windows Forms. Status bar in a text editor, you need to display the number of lines, the number of characters and words, how?

here's something nakalyakal, thanks to a kind person who will solve the problem

ToolStripLabel strokiLabel;
        ToolStripLabel simvolLabel;
 strokiLabel = new ToolStripLabel(richTextBox1.Lines.Length.ToString());
            simvolLabel= new ToolStripLabel(richTextBox1.TextLength.ToString());
           
            strokiLabel.Text = "Кол-во строк:"  + strokiLabel.Text;
            simvolLabel.Text = "Кол-во символ:" + simvolLabel.Text;          
            statusStrip1.Items.Add(strokiLabel.Text);
            statusStrip1.Items.Add(simvolLabel.Text);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Peter, 2018-06-04
@CliverQwerty

The textbox has an event TextChanged. If you write
That in it, the number of characters in the textbox will be indicated.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question