Hi,
is there a way that i can use the AutoScroll = true but also hide the ScrollBars ?
I will sync 2 panels but hide the scrollbars on teh top panel.
I use
Private Sub myPanelBottom_Scroll(sender As Object, e As ScrollEventArgs) Handles myPanelBottom.Scroll
If e.ScrollOrientation = ScrollOrientation.HorizontalScroll Then
Me.mypaneltop.ClientArea.AutoScrollPosition = New Point(-Me.myPanelBottom.AutoScrollPosition.X, -Me.myPanelBottom.AutoScrollPosition.Y)
End If
End Sub
Hi bersch,
This behavior may be achieved by first enabling AutoScroll for both UltraPanels then syncing the position of the first panel in respect to changes made with the second panel by hooking into the second panel’s Scroll event and setting the vertical scroll position value of the first panel to that of the NewValue property exposed by the event’s ScrollEventArgs.
Next, you can effectively hide the first panel’s vertical scrollbar by returning the control, before the VeritcalScrollBarUIElement has been rendered, by implementing the BeforeCreateChildElements method of the IUIElementCreationFilter class and targeting this element; the same technique may be used for the HorizontalScrollBar.
I have constructed and attached a commented sample that demonstrates this approach for further context.
If you have any further questions, please let me know.
Sincerely,Chris KDeveloper Support EngineerInfragistics, Inc.www.infragistics.com/support