Touchscreen scrolling

Thread is closed for posting
5 posts, 1 answers
  1. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 19 Jan 2010 Link to this post


    I have a listbox being used on a touchscreen based PC.  I would like to be able to scroll my list up and down by dragging on the list itself and then pressing an item within the list to select it. 

    Failing that is there any way to increase the width of the scrollbars so that dragging the vertical scrollbar is easier?



  2. Answer
    Georgi avatar
    296 posts

    Posted 22 Jan 2010 Link to this post

    Hello Jon,

    Thanks for contacting us and for your question.

    Currently, the RadControls for WinForms suite does not support touch-screen functionality out of the box.

    However, you can increase the size of the RadScrollBarElement which resides in the RadListBox and thus make it convenient for dragging by using a touch screen.

    Here is how you can achieve this:

    private void AdjustScrollBarWidth(int desiredWidth)
        int defaultWidth = SystemInformation.VerticalScrollBarWidth;
        int offsetLeft = -(desiredWidth - defaultWidth);
        RadScrollLayoutPanel scrollLayout = this.radListBox1.RootElement.Children[0].Children[2] as RadScrollLayoutPanel;
        scrollLayout.VerticalScrollBar.MinSize = new Size(desiredWidth, 0);
        scrollLayout.VerticalScrollBar.Margin = new Padding(offsetLeft, 0, 0, 0);

    I hope this helps. Do not hesitate to contact us if you have other questions.

    All the best,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 26 Jan 2010 Link to this post

    Hi Georgi,

    OK no problem.

    Thanks for the code demoing the increased scrollbar width - I'll get my app modified to work with this.

    Best Regards,

  4. Dave
    Dave avatar
    19 posts
    Member since:
    Nov 2010

    Posted 23 Sep 2011 Link to this post

    We are using the latest version of your controls which no longer has the RadListBox.  How can we acheive the same results using RadListControl or RadListView?

  5. Stefan
    Stefan avatar
    2911 posts

    Posted 28 Sep 2011 Link to this post

    Hello Dave,

    Thank you for writing.

    Please refer to the attached project, which demonstrates how to increase the size of the scroll bars in RadListControl and RadListView. Additionally, you can observe the implementation of kinetic scrolling, which you might find helpful for touch applications.

    I hope that you find this helpful. Should you have any other questions, do not hesitate to contact us.
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top