Page 1 of 1

Override Two

PostPosted: Fri Nov 10, 2017 12:28 pm
by Silvio.Falconi
I wish change the buttonbar of the rpreview and I use Override command

Code: Select all  Expand view
  OVERRIDE METHOD BuildButtonBar IN CLASS TPreview WITH PreviewButtonBarNew

Function PreviewButtonBarNew()
....
return nil
 

at init it seem run ok then when I wish use zoom or two pages it make error

Image

Cristobal sad me to insert a function to set the lRebar variable


Code: Select all  Expand view

Function SetGetlRebar( lVal )

if !Empty( lVal ) .and Valtype( lVal ) = "L"
   lRebar  := lVal
endif

Return lRebar



and use it on my function

Code: Select all  Expand view
Function PreviewButtonBarNew()

   local oImageList, oReBar, oBar, oHand, uRet, oBtn
   local Self := HB_QSelf()
   local lRebar := .t.

  SetGetlRebar( .T. )

   DEFINE CURSOR ::oHand HAND

   if lRebar



but it have the same error

someone can help me please

Re: Override Two

PostPosted: Sun Nov 12, 2017 10:05 pm
by Silvio.Falconi
any solution please ?

I change on Rpreview class this line : ( and it seems to run ok)


if ! IsAppThemed()

instead of

if ! lRebar

on these methods :

TwoPages( lMenu )
Zoom( lMenu )


on Oldest rpreview there is wroten if ! IsAppThemed()

it is the bug or I make a mistake ?


THEN THERE IS AN ERROR ON RPREVIEW
the nStyle is allways 2007 also when I use 2015 as buttonbar
the menu is 2007 why ? on win10 this is bad ....

Re: Override Two

PostPosted: Fri Nov 17, 2017 9:01 am
by Silvio.Falconi
I think we must re-write all Tpreview class ....

Re: Override Two

PostPosted: Fri Nov 17, 2017 7:53 pm
by Silvio.Falconi
then I rewrote also the METHOD BuildMenu, METHOD SaveAsMenu, METHOD PrintersMenu because I must change the bitmaps with the same of buttonbar

Re: Override Two

PostPosted: Mon Nov 20, 2017 5:44 pm
by Silvio.Falconi
I tried change lrebar and nstyle to DATA and perhaps can run