FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FW Preview Menu
Posts: 218
Joined: Mon Feb 07, 2022 09:54 PM
FW Preview Menu
Posted: Thu May 05, 2022 08:54 PM

Hi all,

is there a way to avoid/hide the menu when a print preview is shown?
i already eliminated the buttons for navigation and export.
But a user could open the menu and use it's commands.

Regards, Detlef

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: FW Preview Menu
Posted: Thu May 05, 2022 10:12 PM
Hello Detlef,

oPrinter:lPreview

Interesting, just yesterday I was dealing with this issue.

https://www.facebook.com/groups/modharbour.club/?multi_permalinks=1114768252410734

I tried to open the oReport with and without preview.

I didn't find out how this works with the oReport and then I chose a simple variant.
In the source code I looked and I think there it is lScreen.

Best regards,
Otto

Code (fw): Select all Collapse
if Setup():lReportPreview = .t.
    REPORT oReport TITLE ::cVKBereich, cTITLE, cSubTitleZeit  LEFT ;
                  FONT   oFont1,;
                  oFont2,;
                  oFont3 ;
                  PEN oPen1;
                  HEADER Setup():LizenzNehmer()," ", ALLTRIM("Erstellt: " + dtoc(date())+ " - "+time()) RIGHT;
                  FOOTER  ( "Seite: " ) + str( oReport:nPage, 3 ) ;
                  CAPTION "CAPTION";
                  CENTERED ;
                  PREVIEW


else


    REPORT oReport TITLE ::cVKBereich, cTITLE, cSubTitleZeit  LEFT ;
                  FONT   oFont1,;
                  oFont2,;
                  oFont3 ;
                  PEN oPen1;
                  HEADER Setup():LizenzNehmer()," ", ALLTRIM("Erstellt: " + dtoc(date())+ " - "+time()) RIGHT;
                  FOOTER  ( "Seite: " ) + str( oReport:nPage, 3 ) ;
                  CAPTION  "U" +  ::UniqueID  ;
                  CENTERED 
endif
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: FW Preview Menu
Posted: Thu May 05, 2022 10:30 PM

Detlef,
I think I misunderstood your question.
You probably need to change the RPreview classe and link in the changed one.

I do it this way for the invoice preview.

Best regards,
Otto

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FW Preview Menu
Posted: Fri May 06, 2022 06:04 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FW Preview Menu
Posted: Fri May 06, 2022 08:32 AM
Code (fw): Select all Collapse
TPreview():bSetUp := { |oPreview, oWnd| oWnd:oMenu:End() }


Include this code, before your PRINT oPrn PREVIEW
Regards



G. N. Rao.

Hyderabad, India
Posts: 218
Joined: Mon Feb 07, 2022 09:54 PM
Re: FW Preview Menu
Posted: Fri May 06, 2022 01:48 PM
Antonio Linares wrote:Dear Detlef,

Please review this:

http://fivetechsupport.com/forums/viewt ... 3f#p227931


Many thanks, Antonio.
This gave me plenty of information and a lot inspiration. :-)
Posts: 218
Joined: Mon Feb 07, 2022 09:54 PM
Re: FW Preview Menu
Posted: Fri May 06, 2022 01:50 PM
nageswaragunupudi wrote:
Code (fw): Select all Collapse
TPreview():bSetUp := { |oPreview, oWnd| oWnd:oMenu:End() }


Include this code, before your PRINT oPrn PREVIEW

Mr. Rao,
Many thanks. That works okay now. :-)

Continue the discussion