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

scroll the buttons with mouse wheel

1 Answer 152 Views
PageView
This is a migrated thread and some comments may be shown as answers.
Farshad
Top achievements
Rank 1
Farshad asked on 05 Jun 2013, 03:51 AM
Hi:

I am using RadPageView Backstage mode, As I have many buttons in my element bar, I am using StripButtons for scrolling among them. I want to use mouse Wheel for scrolling among the Items. 

Is there anyway to do that? 

Sincerely
Farshad Zamani

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 07 Jun 2013, 03:06 PM
Hi Farshad,

Thank you for writing.

You should handle the RadPageView's MouseWheel event and call ScrollButton's PerformClick in this event.
For example:
public Form1()
{
    InitializeComponent();
    this.radPageView1.MouseWheel += new MouseEventHandler(radPageView1_MouseWheel);
    ((RadPageViewBackstageElement)radPageView1.ViewElement).StripButtons = StripViewButtons.Scroll;           
}
 
void radPageView1_MouseWheel(object sender, MouseEventArgs e)
{
    if (e.Delta > 0)
    {
        ((RadPageViewBackstageElement)radPageView1.ViewElement).ItemContainer.ButtonsPanel.ScrollLeftButton.PerformClick();
    }
    else
    {
        ((RadPageViewBackstageElement)radPageView1.ViewElement).ItemContainer.ButtonsPanel.ScrollRightButton.PerformClick();
    }
}

I hope this helps.

Regards,
Peter
Telerik
RadChart for WinForms is obsolete. Now what?
Tags
PageView
Asked by
Farshad
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or