Customizar el PREVIEW

Customizar el PREVIEW

Postby goosfancito » Mon Oct 25, 2021 8:25 am

Hola.

Quiero customizar el preview del fwh, como ser que solo aparezca el boton "exportar a pdf" eso se puede hacer?
hay info?

gracias.
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Re: Customizar el PREVIEW

Postby karinha » Mon Oct 25, 2021 10:28 am

Mira el RPREVIEW.PRG

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7831
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Customizar el PREVIEW

Postby goosfancito » Mon Oct 25, 2021 8:01 pm

karinha wrote:Mira el RPREVIEW.PRG

Regards, saludos.



no me estaría ayudando esa respuesta.
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Re: Customizar el PREVIEW

Postby karinha » Mon Oct 25, 2021 8:28 pm

Inicia por aqui:

Code: Select all  Expand view  RUN

   METHOD BuildMenu() CLASS TPreview
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7831
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Customizar el PREVIEW

Postby leandro » Tue Oct 26, 2021 11:13 am

Hola como vas?

En las primeras líneas de tu prg principal
Code: Select all  Expand view  RUN

//PERSONALIZAMOS LA BARRA DE BOTONES DE LA VISTA PREVIA
TPreview():bButtonBar := {| oPreview, oWnd | YourButtonBar (oPreview, oWnd)}
 


Code: Select all  Expand view  RUN

**************************************
*BUTTON BAR PERSONALIZADA PARA PREVIEW
**************************************
function YourButtonBar (oPreview, oWnd)
LOCAL oBar
Local nCopia := 1

DEFINE BUTTONBAR oBar OF oWnd SIZE 60,60 2015
oPreview:oBar := oBar

DEFINE BUTTON OF oBar RESOURCE "#8517" PROMPT "Imprimir" TOOLTIP "Imprimir Factura" ;
    ACTION oPreview:PrintPage()
DEFINE BUTTON OF oBar RESOURCE "#8545" PROMPT "Zoom" TOOLTIP "Zoom" ;
    ACTION oPreview:Zoom() GROUP
DEFINE BUTTON OF oBar RESOURCE "#8506" PROMPT "PDF" TOOLTIP "Exportar a PDF" ;
    ACTION oPreview:SaveAs(.T.) GROUP
DEFINE BUTTON OF oBar RESOURCE "#8506" PROMPT "WORD" TOOLTIP "Exportar a WORD" ;
    ACTION oPreview:SaveAs(.F.) 
   
DEFINE BUTTON OF oBar RESOURCE "#8548" PROMPT "Primera" TOOLTIP "Primera Página " ;
    ACTION oPreview:TopPage() GROUP
DEFINE BUTTON OF oBar RESOURCE "#8546" PROMPT "Anterior" TOOLTIP "Página Anterior" ;
    ACTION oPreview:PrevPage()
DEFINE BUTTON OF oBar RESOURCE "#8547" PROMPT "Siguiente" TOOLTIP "Página Siguiente" ;
    ACTION oPreview:NextPage() 
DEFINE BUTTON OF oBar RESOURCE "#8549" PROMPT "Ultima" TOOLTIP "Ultima Página" ;
    ACTION oPreview:BottomPage()   
   
DEFINE BUTTON OF oBar RESOURCE "#8513" PROMPT "Cerrar" TOOLTIP "Salir de la Previsualización" ;
        ACTION (oPreview:oWnd:End() ) GROUP
oBar:GoTop()

Return nil

 
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1676
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: Customizar el PREVIEW

Postby goosfancito » Wed Oct 27, 2021 12:46 am

leandro wrote:Hola como vas?

En las primeras líneas de tu prg principal
Code: Select all  Expand view  RUN

//PERSONALIZAMOS LA BARRA DE BOTONES DE LA VISTA PREVIA
TPreview():bButtonBar := {| oPreview, oWnd | YourButtonBar (oPreview, oWnd)}
 


Code: Select all  Expand view  RUN

**************************************
*BUTTON BAR PERSONALIZADA PARA PREVIEW
**************************************
function YourButtonBar (oPreview, oWnd)
LOCAL oBar
Local nCopia := 1

DEFINE BUTTONBAR oBar OF oWnd SIZE 60,60 2015
oPreview:oBar := oBar

DEFINE BUTTON OF oBar RESOURCE "#8517" PROMPT "Imprimir" TOOLTIP "Imprimir Factura" ;
    ACTION oPreview:PrintPage()
DEFINE BUTTON OF oBar RESOURCE "#8545" PROMPT "Zoom" TOOLTIP "Zoom" ;
    ACTION oPreview:Zoom() GROUP
DEFINE BUTTON OF oBar RESOURCE "#8506" PROMPT "PDF" TOOLTIP "Exportar a PDF" ;
    ACTION oPreview:SaveAs(.T.) GROUP
DEFINE BUTTON OF oBar RESOURCE "#8506" PROMPT "WORD" TOOLTIP "Exportar a WORD" ;
    ACTION oPreview:SaveAs(.F.) 
   
DEFINE BUTTON OF oBar RESOURCE "#8548" PROMPT "Primera" TOOLTIP "Primera Página " ;
    ACTION oPreview:TopPage() GROUP
DEFINE BUTTON OF oBar RESOURCE "#8546" PROMPT "Anterior" TOOLTIP "Página Anterior" ;
    ACTION oPreview:PrevPage()
DEFINE BUTTON OF oBar RESOURCE "#8547" PROMPT "Siguiente" TOOLTIP "Página Siguiente" ;
    ACTION oPreview:NextPage() 
DEFINE BUTTON OF oBar RESOURCE "#8549" PROMPT "Ultima" TOOLTIP "Ultima Página" ;
    ACTION oPreview:BottomPage()   
   
DEFINE BUTTON OF oBar RESOURCE "#8513" PROMPT "Cerrar" TOOLTIP "Salir de la Previsualización" ;
        ACTION (oPreview:oWnd:End() ) GROUP
oBar:GoTop()

Return nil

 




gracias!
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Verhoven and 46 guests

cron