Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Scheduler and Reminder > Timeline view & horizontal scroll click

Answered Timeline view & horizontal scroll click

Feed from this thread
  • MattL avatar

    Posted on Jan 31, 2012 (permalink)

    I need to detect if the user has clicked the horizontal scrollbar rather than an appointment, cell element, RadSchedulerNavigator or the RadCalendar associated with the RadScheduler.

    Have not been able to work out how to attach to the event.

    Thanks

    Reply

  • Answer Stefan Stefan admin's avatar

    Posted on Feb 3, 2012 (permalink)

    Hi Matt,

    Thank you for writing.

    You can detect which element you have clicked by subscribing to the MouseDown event of the control and check the clicked element type. Here is a sample demonstrating how to check if the scroll bar, its buttons or its thumb is clicked:
    void radScheduler1_MouseDown(object sender, MouseEventArgs e)
    {
        ScrollBarThumb thumb = radScheduler1.ElementTree.GetElementAtPoint(e.Location) as ScrollBarThumb;
        if (thumb != null)
        {
            //thumb is clicked
        }
     
        ScrollBarButton btn = radScheduler1.ElementTree.GetElementAtPoint(e.Location) as ScrollBarButton;
        if (btn != null)
        {
            //scroll btn is clicked
        }
     
        RadScrollBarElement scroll = radScheduler1.ElementTree.GetElementAtPoint(e.Location) as RadScrollBarElement;
        if (scroll != null)
        {
            //scroll is clicked
        }
    }

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

    SP1 of Q3’11 of RadControls for WinForms is available for download (see what's new).

    Reply

  • MattL avatar

    Posted on Feb 7, 2012 (permalink)

    Thanks, just what I was after.

    Reply

  • Stefan Stefan admin's avatar

    Posted on Feb 9, 2012 (permalink)

    Hello Matt,

    I am glad that I could help. Do not hesitate to contact us if you have any other questions.

    Greetings,
    Stefan
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Scheduler and Reminder > Timeline view & horizontal scroll click
Related resources for "Timeline view & horizontal scroll click"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]