How to get Panel Bar Scrollbar Value

2 posts, 0 answers
  1. Jay Jose
    Jay Jose avatar
    13 posts
    Member since:
    Jul 2009

    Posted 01 Oct 2009 Link to this post

    Hi,

    How do we get the scrollbar value of a Panel Bar? And, how do we put event handler for Scroll?

    I tried using PanelBar.VerticalScroll.Value, it always returns 0;
    I also tried attaching an event handler PanelBar.Scroll += new ScrollEventHandler(rPnlbRssFeed_Scroll), but it does not raise the event upon scrolling.


    Regards,
    Jay
  2. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 07 Oct 2009 Link to this post

    Hello Jay Jose,

    Thank you for contacting us.

    The sample code below will show you how to subscribe to the ValueChanged event of the scroll bar and how to get its value..

        1.   RadVScrollBar scrollBar = this.radPanelBarDemo.Controls[0] as RadVScrollBar;
             scrollBar.ValueChanged += new EventHandler(scrollBar_ValueChanged);

         2. void scrollBar_ValueChanged(object sender, EventArgs e)
            {
                RadVScrollBar scrollBar = this.radPanelBarDemo.Controls[0] as RadVScrollBar;
                int scrollValue = scrollBar.Value;
            }

    Please do not hesitate to write me again if you have more questions.

    Best wishes,
    Boyko Markov
    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. UI for WinForms is Visual Studio 2017 Ready
Back to Top