Hello,
How can i control the number of scroll lines using the scroll-wheel in a DCPRINT PREVIEW
I tried SCROLLFACTOR 2, but that does not seem to work.
Suggestions are welcome
DCPRINT PREVIEW Scroll wheel sensivety
DCPRINT PREVIEW Scroll wheel sensivety
Regards,
Jack Duijf
Jack Duijf
Re: DCPRINT PREVIEW Scroll wheel sensivety
Jack -
I may have to put a special handler in that code.
I haven't touched the dcprint system in years.
I'll see what I can do.
I may have to put a special handler in that code.
I haven't touched the dcprint system in years.
I'll see what I can do.
The eXpress train is coming - and it has more cars.
Re: DCPRINT PREVIEW Scroll wheel sensivety
Hello Roger,
I already found where to handle this in _dcprc.prg, XbpPreview:vScroll()
Quite simple to fix.
I am also looking for suppressing every second event of the scroll that Windows seems to fire if the mousewheel is changed just one notch.
Can you please add this to the next version?
For simplicity i set the scroll range to 50, but this ofcourse should be a parameter in DCPRINT ON and DCPRINT OPTIONS.
I already found where to handle this in _dcprc.prg, XbpPreview:vScroll()
Quite simple to fix.
I am also looking for suppressing every second event of the scroll that Windows seems to fire if the mousewheel is changed just one notch.
Can you please add this to the next version?
For simplicity i set the scroll range to 50, but this ofcourse should be a parameter in DCPRINT ON and DCPRINT OPTIONS.
Code: Select all
LOCAL nScrollDepth := 50
CASE nCommand == XBPSB_PREVPOS
//
// 08-10-2022 J. Duijf
// Smooth scrolling
//
nScroll = ::vScroll:getData()
If nScroll > 0
If nScrollDepth > 0
nScroll -= nScrollDepth
Else
nScroll -= ::vScroll:setScrollBoxSize()
Endif
::vScroll:setData( Max(nScroll, 0) )
::setOrigin( ::hScroll:getData(), ::vScroll:getData() )
Else
//
// Already on top,
// Prevent flickering of the preview
//
Endif
CASE nCommand == XBPSB_NEXTPOS
//
// 08-10-2022 J. Duijf
// Smooth scrolling
//
If nScrollDepth > 0
nScroll := ::vScroll:getData() + nScrolDepth
Else
nScroll := ::vScroll:GetData() + ::vScroll:setScrollBoxSize()
Endif
If nScroll < ::vScroll:setRange()[2]
//
// Only if there is something to Scroll
//
::vScroll:setData( Min(nScroll, ::vScroll:setRange()[2]) )
::setOrigin( ::hScroll:getData(), ::vScroll:getData() )
Else
//
// No scroll possible
// Prevent flickering of the preview
//
Endif
Regards,
Jack Duijf
Jack Duijf