This is a migrated thread and some comments may be shown as answers.
Touchscreen scrolling
4 Answers 141 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jon
Top achievements
Rank 1
Jon asked on 19 Jan 2010, 11:52 AM
Hi,

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?

Regards,

Jon

4 Answers, 1 is accepted

Sort by
0
Accepted
Georgi
Telerik team
answered on 22 Jan 2010, 08:49 AM
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,
Georgi
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.
0
Jon
Top achievements
Rank 1
answered on 26 Jan 2010, 08:23 AM
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,

Jon
0
Dave
Top achievements
Rank 1
answered on 23 Sep 2011, 04:13 PM

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?

Thanks
0
Stefan
Telerik team
answered on 28 Sep 2011, 12:29 PM
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.
 
Greetings,
Stefan
the Telerik team

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

Asked by
Jon
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Jon
Top achievements
Rank 1
Dave
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or