SlideBar - Syncronize two SlideBars

0
0

Hi,

How do I syncronyze two SlideBars ?

Whem I scroll one SlideBar the other moves to same positon as the first one ?

Follow an image …

Try the code above, but did´n work for the SlideBar…

Code 1:

private void slideBarLines_Scroll(object sender, ScrollEventArgs e)
{
this.SuspendLayout();
slidePanelHeader.HorizontalScroll.Value = slideBarLines.HorizontalScroll.Value;
this.ResumeLayout();
}

private void slidePanelHeader_Scroll(object sender, ScrollEventArgs e)
{
this.SuspendLayout();
slideBarLines.HorizontalScroll.Value = slidePanelHeader.HorizontalScroll.Value;
this.ResumeLayout();

}

Code 2:

private void slidePanelHeader_ScrollAnimationEnd(object sender, EventArgs e)
{
this.SuspendLayout();
slideBarLines.HorizontalScroll.Value = slidePanelHeader.HorizontalScroll.Value;
this.ResumeLayout();
}

private void slideBarLines_ScrollAnimationEnd(object sender, EventArgs e)
{
this.SuspendLayout();
slidePanelHeader.HorizontalScroll.Value = slideBarLines.HorizontalScroll.Value;
this.ResumeLayout();
}

Regards

 

 

 

Attachment
  • You must to post comments
0
0

Hi Marcelo,

did you try the following ?

In scroll event of SlideBar1 call

this.slideBar2.ScrollTo(e.NewValue, 1000);

where 1000 is the duration for the scroll animation.

Hope that helps.

Best regards
Frank

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.