Saint
Saint

Reputation: 5469

How to disable autoscrolling in richTextBox?

How can I disable autoscrolling in richTextBox by simultaneously enabled possibility of text selection?

Upvotes: 1

Views: 1403

Answers (2)

Hans Passant
Hans Passant

Reputation: 941465

Setting the focus to another control is the simple way.

In general, you don't want the user to see these updates at all. It tends to cause a lot of flicker while you are updating the content. The boilerplate solution that most controls provide for that is their BeginUpdate and EndUpdate methods. RichTextBox is missing them however. You can add them though with a wee bit of pinvoke. You'll find the required code in this answer.

Upvotes: 2

Vikram Jain
Vikram Jain

Reputation: 5588

Please , Make ReadOnly is true for selection text but disable for change String. Ex. : RichTextBox1.ReadOnly=True RichTextBox1.ScrollBars = RichTextBoxScrollBars.None;

Upvotes: 0

Related Questions