vilian wrote:Yes.
vilian wrote:Thank You Karinha, But it's not the problem. IF I generate the EXE with my previous version of FWH (1905) everything is fine. So the problem isn't with windows version.
The problem only is happening with the FWH2104 version.
#include "FiveWin.ch"
#define PAD_LEFT 0
static oWnd,oPrn,oPenDot,oPenFill,oPenSolid
//----------------------------------------------------------------------------//
function Main()
DEFINE WINDOW oWnd FROM 1, 1 TO 20, 60 TITLE "Printing a Window"
@ 3, 3 BUTTON "&Print me" OF oWnd SIZE 80, 20 ;
ACTION PrintMe() // try also with oWnd:HardCopy()
ACTIVATE WINDOW oWnd
return nil
//----------------------------------------------------------------------------//
function PrintMe()
PRINT oPrn NAME "Test" PREVIEW
oPrn:SetLandscape()
DEFINE BRUSH oPenFill COLOR CLR_HGRAY
Define Pen oPenDot style PS_DOT Width 1 Color CLR_BLACK Of oPrn
DEFINE FONT oFont07v NAME "ARIAL" SIZE 0,-07 OF oPrn NESCAPEMENT 900
Define Pen oPenSolid style PS_SOLID Width 2 Color CLR_BLACK Of oPrn
PAGE
Box(05.9,1.5,0.6,01.2,"","Faturas",PAD_LEFT,,,,,oFont07v,,.t.,.t.)
Box(07.1,1.5,0.6,01.2,""," Cálculo",PAD_LEFT,,,,,oFont07v,,.t.,.t.)
Box(07.1,1.7,0.6,01.2,""," Imposto",PAD_LEFT,,.f.,,,oFont07v,,.t.)
Box(08.3,1.5,0.6,01.9,"","Transportador",PAD_LEFT,,,,,oFont07v,,.t.,.t.)
ENDPAGE
ENDPRINT
return nil
FUNCTION Box(nlin,nCol,nComprimento,nAltura,uGroup,uTexto,nPadTexto,oLogoImage,lDrawBox,nTotalItens,lPosiciona,oFont,lFazQuebra,lVertical,lFill)
LOCAL aPos:=Array(2),aTam:=Array(2),nPos,nRow,f,nLinha,nLinhasTexto,nMarginTexto,aMargin,lPrimeiraVez,lFimPag:=.f.
LOCAL nMarginCol, nMarginTam,nMarginRow,nCont,cTexto,cParteTexto,aGroup,nStart
Default utexto:="", nPadTexto:=PAD_LEFT,lDrawbox:=.t.
Default lPosiciona:=.f.,lVertical:=.f.,lFill:=.f.
aPos[1]:=((nLin * 10 * (oPrn:nVertRes() / oPrn:nVertSize() )))
aPos[2]:=((nCol * 10 * (oPrn:nHorzRes() / oPrn:nHorzSize() )))
aTam[1]:=((nComprimento * 10 * oPrn:nVertRes() / oPrn:nVertSize()))
aTam[2]:=(nAltura * 10 * oPrn:nHorzRes() / oPrn:nHorzSize())
aGroup:=If(Valtype(uGroup)=="A",uGroup,{uGroup})
IF lPosiciona
aLinhaLista[nPagAtual]:={}
aPosicaoLista[nPagAtual]:={}
ENDIF
IF lDrawBox
oPrn:RoundBox(aPos[2],aPos[1],aPos[2]+aTam[1],aPos[1]+aTam[2],20,20,oPenSolid,If(lFill,CLR_HGRAY,NIL))
ENDIF
aPos[1]:=(((nLin+nAltura-0.2) * 10 * (oPrn:nVertRes() / oPrn:nVertSize() )))
aPos[2]:=((nCol * 10 * (oPrn:nHorzRes() / oPrn:nHorzSize() )))
aMargin := oPrn:SizeInch2Pix(If(Empty(aGroup[1]),0.03,0.08),0.03)
nRow := aPos[1]+aMargin[2]
nCol := aPos[2]+aMargin[1]
oPrn:Say(nRow,nCol,uTexto,oFont,,CLR_BLACK,,PAD_LEFT)
Return(Nil)
karinha wrote:If I understand the logic, the BOX is not going to the left, respecting the defined font, is that correct?
A bug that FiveTech urgently needs to fix.
Greetings.
vilian wrote:Only RPREVIEW.prg I use a modified version, but i tried without this and the problem is the same. I Think the problem is with the method oPrn:Line(), I'm checking...
I
IF lPosiciona
aLinhaLista[nPagAtual]:={}
aPosicaoLista[nPagAtual]:={}
ENDIF
NIL[NIL] := {}
NIL[NIL] := {}
TOP LEFT BOTTOM RIGHT
354.3434343 1393.804762 496.0862915 1677.279509
354.3434343 1677.290476 496.0862915 1960.765224
401.5892256 1677.290476 543.3320827 1960.765224
354.3434343 1960.77619 496.0862915 2409.611207
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot], Silvio.Falconi and 35 guests