This is a migrated thread and some comments may be shown as answers.

Scroll to item in RadScrollablePanel

1 Answer 158 Views
ScrollablePanel
This is a migrated thread and some comments may be shown as answers.
Hamid
Top achievements
Rank 1
Hamid asked on 07 Oct 2012, 11:19 AM
Hi
I use RadScrollablePanel in my app. In runtime add many buttons. In other list when user select name of button, RadScrollablePanel scroll to button. how can i do this? RadScrollablePanel is AutoScroll enabled.
I use this code too : 
Point btnpos = new Point(itemButton.Location.X,itemButton.Location.Y);
PanelOfEachGroup.VerticalScrollbar.PerformScrollTo(btnpos);

and:
PanelOfEachGroup.ScrollControlIntoView(btnpos);

btnpos is the button in RadScrollablePanel.
Thanks.

1 Answer, 1 is accepted

Sort by
0
Anton
Telerik team
answered on 09 Oct 2012, 01:48 PM
Hi Hamid,

Thank you for contacting Telerik Support.

This scenario is not supported, however, you can achieve the desired functionality with the following work around:
this.radScrollablePanel1.VerticalScrollbar.Value = button2.Location.Y;
this.radScrollablePanel1.VerticalScrollbar.PerformSmallIncrement(1);
this.radScrollablePanel1.VerticalScrollbar.PerformSmallDecrement(1);

I hope this helps.

Greetings,
Anton
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Tags
ScrollablePanel
Asked by
Hamid
Top achievements
Rank 1
Answers by
Anton
Telerik team
Share this question
or