Posted 8 September 2017, 1:48 pm EST
I have a two level hierarchical dataset which i bind to a sheet. When a child sheet is visible the behaviour of the mousewheel is not the way I want it.
If I start mousewheeling with the cursor over the parent sheet, the parent sheet scrolls as intended. But when the child sheet then is scrolled to a position where the cursor is over the child sheet, the scrolling stops since the child sheet takes over the scrolling (And all the rows of the child sheet are visible => no scrolling).
I want to be able to scroll the entire spread, parent sheet AND child sheets as one, regardless of which sheet the cursor is over.
Using info in another forum post I managed to figure out if the cursor is over a child sheet or not:
Private Sub ssData_MouseWheel(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ssData.MouseWheel
For Each sv As FarPoint.Win.Spread.SpreadView In ssData.GetRootWorkbook.GetChildWorkbooks
Dim cr As FarPoint.Win.Spread.Model.CellRange = sv.GetCellFromPixel(e.X, e.Y)
If cr.Column <> -1 Then 'If cr.column = -1 we're in the parent sheet.
'Pass the MouseWheel event to the parent sheet. How???
How do I make the parent sheet scroll instead of the child sheet?
I'm using Spread for winforms, version 2.5.2013.2005
The behaviour is reproducable in the HierarchyVB sample project.