Scrolling RadTextBox

2 posts, 0 answers
  1. Terry
    Terry avatar
    39 posts
    Member since:
    Sep 2007

    Posted 01 Feb 2013 Link to this post


    I'll try and explain what I'm after. I have a multiline RadTextBox, (takes about 7 lines of text). I dont 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 RichTextbox 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.


  2. Plamen
    Plamen avatar
    132 posts

    Posted 06 Feb 2013 Link to this post

    Hi Terry,

    Thank you for writing.

    I would suggest that you use RadTextBoxControl that supports the desired feature. Moreover, the scrollbars that appear for RadTextBoxControl are our own, so they match our styles, while in the case of RadTextBox, we are hosting the standard TextBox control, hence the functionality and ScrollBars there are the standard ones. Here is a sample code snippet that will allow you to achieve the desired behavior:
    this.radTextBoxControl1.Multiline = true;
    this.radTextBoxControl1.WordWrap = true;
    this.radTextBoxControl1.VerticalScroll.Enabled = true

    I hope this helps.

    All the best,
    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
  3. DevCraft R3 2016 release webinar banner
Back to Top