Sammy,
For some years (2005) I'm using a macro which was written by Ross Boyd;
-------------------------------------------------------------------
Proc ScrollCurs()
Integer i_WinSize = Query(WindowRows)
Integer i_WindowRowsToPreserveAtTop = i_WinSize / 2
Integer i_WindowRowsToPreserveAtFoot = i_WinSize - (i_WindowRowsToPreserveAtTop + 1)
If i_WindowRowsToPreserveAtFoot + i_WindowRowsToPreserveAtTop < i_WinSize
Case CurrRow()
When 1..i_WindowRowsToPreserveAtTop
ScrollToRow(i_WindowRowsToPreserveAtTop + 1)
When
i_WinSize - i_WindowRowsToPreserveAtFoot + 1..i_WinSize
ScrollToRow(i_WinSize - i_WindowRowsToPreserveAtFoot)
EndCase
EndIf
End
Proc Main()
Hook(_PRE_UPDATE_ALL_WINDOWS_, ScrollCurs)
End Main
Proc WhenLoaded()
Main()
End
<WheelUp> If NOT Up()
Alarm()
EndIf
<WheelDown> If NOT Down()
Alarm()
EndIf
-------------------------------------------------------------------
This was working perfectly for me under windows up to version 11 pro.
However this macro doesn't work under linux Ubuntu, it even blocks the mousewheel while the CursorUp
and CursorDown are working perfectly.
So I started looking and found the following solution being ScrollToCenter() with which I made the following
macro;
-------------------------------------------------------------------
Proc ScrollCurs()
ScrollToCenter()
End
Proc Main()
Hook(_PRE_UPDATE_ALL_WINDOWS_, ScrollCurs)
End Main
Proc WhenLoaded()
Main()
End
<WheelUp> If NOT Up()
Alarm()
EndIf
<WheelDown> If NOT Down()
Alarm()
EndIf
-------------------------------------------------------------------
But this gave the same result under windows (working perfectly) but also under Ubuntu (NOT).
I'm using the linuxmouse of Carlo which works perfect but without keeping the scroll line in the middle if I don't load the scrollmacro.
Can you steer me in the right direction? Or worse is this a bug?