Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1110
Scrollbar does not move in ultrapanel when setting AutoScrollPosition
posted

I have a panels containing a bigger panel and AutoScroll = True.

I have switched from a normal panel to an UltraPanel and setting the AutoScrollPosition. When I do this in a normal panel, the scrollbar moves but in the UltraPanel it does not.

This is my code in the eventhandler of the mousewheel (UltraPanel1 contains UltraPanel2):

Private Sub panel1_MouseWheel(sender As Object, e As System.Windows.Forms.MouseEventArgs)
       Dim numberOfPixelsToMove As Integer = e.Delta * SystemInformation.MouseWheelScrollLines / 10

        Dim newY As Integer = -UltraPanel1.ClientArea.AutoScrollPosition.Y - numberOfPixelsToMove
        UltraPanel1.ClientArea.AutoScrollPosition = New Point(0, newY)
End Sub

I see UltraPanel2 moving but the scrollbar of UltraPanel1 does not.

Parents
  • 9190
    Offline posted

    Hello,

    I will be happy to assist you with this issue.

    May I ask you if you have controls placed inside both panels? I ask this because I found that scrolling happens to the panel only when the control inside that panel has focus. The reason why the UltraPanel1 doesn't work in this instance may be due to the control inside UltraPanel2 having focus. Please provide me with more information on how you have your layout setup and I can attempt to provide you with a solution to this issue

    Please let me know if you have further questions regarding this matter.

     

Reply Children