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.
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.
Hi, Jose,
Yes, Panel2 contains 1 UltraLabel.Even when I set Panel2.Focus() it does not work.