0

I'll try and explain what I'm after.
I have a multiline RadTextBox, (takes about 7 lines of text). I do n't want to show scroll bars as I start to type.
When the text gets to the 8th line either via enter or wordwrap to make the vertical scroll bar appear.

I can do this with a RadRichTextbox or RadTextBoxControl, but need to use a RadTextBox.
Is this possible?
I have tried using the .lines property but that doesn't increment when using word wrap.
Any help much appreciated.

SilverLight
  • 19,668
  • 65
  • 192
  • 300

1 Answers1

1

RadTextBox from the Telerik UI for WinForms suite internally hosts the standard MS TextBox. Hence, if you want to scroll the multiline text in it, you should do it in a similar way as in the MS TextBox. The TextBox.ScrollBars Property controls which scroll bars should appear in a multiline TextBox control. You can set it to ScrollBars.Vertical. Then, you can either use the up/down arrow buttons on the keyboard or the vertical scrollbar to navigate through the multiple lines:

        this.radTextBox1.Multiline = true; 
        this.radTextBox1.AutoSize = false;
        this.radTextBox1.Size = new Size(50, 50);
        this.radTextBox1.TextBoxElement.TextBoxItem.TextBoxControl.ScrollBars = ScrollBars.Vertical;

Here is the result

I hope this information helps.

Dess
  • 374
  • 1
  • 2
  • Thanks for the answer, But you did n't notice on --When Needed--, i do n't want to show scrollbars at the beginning. – SilverLight Dec 20 '20 at 08:43