1) Pressing Ctrl - Minus at preview screen will zoom out in small decrement
2) Pressing Ctrl - Plus at preview screen will zoom in in small increment
I don't want to maintain and link in the old rpreview.prg anymore when using latest FWH libs.
So what's the best way to achieve, just by recompiling, all the preview will:
1) not show the small page icons on the left side (TPrinter():lListViewHide := .t. right?)
2) be able to use Ctrl - Minus and Ctrl - Plus to have zoom in/out in small increment
In the old rpreview I amended CheckKey()
- Code: Select all Expand view
static function CheckKey (nKey,nFlags) // Thanks to Joerg K.
if GetKeyState( VK_CONTROL )
do case
case nKey == 37 //Left
Adjust( 1 )
case nKey == 39 //Right
Adjust( 2 )
case nKey == 38 //Up
Adjust( 3 )
case nKey == 40 //Down
Adjust( 4 )
case nKey == 80 //P
PrintPage()
case nKey == 109 .or. nKey == 189 //-
SetFactor( nil, -.05 )
case nKey == 107 .or. nKey == 187 //+
SetFactor( nil, +.05 )
and SetFactor()
- Code: Select all Expand view
static function SetFactor(nValue, nFine)
local lInit := .F.
if nValue == nil .and. nFine == nil
Aeval(aFactor, {|v,e| v:nHelpId := e})
nValue := nZFactor
lInit := .T.
endif
if nFine != nil
nZFactor += nFine
endif
Aeval(aFactor, {|val,elem| val:SetCheck( (elem == nZFactor) ) })
oMeta1:SetZoomFactor(nZFactor, nZFactor*2)
if !lZoom .AND. !lInit
Zoom(.T.)
endif
if lZoom
oWnd:oVScroll:SetRange( 1, VSCROLL_RANGE )
if nZFactor > 1
oWnd:oHScroll:SetRange( 1, HSCROLL_RANGE )
else
oWnd:oHScroll:SetRange( 0, 0 )
endif
endif
oMeta1:SetFocus()
return nil
TIA