Page 1 of 1

oPrn BOX ERROR

Posted: Fri Oct 30, 2020 9:05 am
by Silvio.Falconi
Image

I need to make this box and put the text on one of 9 position

Top left
Top Right
Top Center

Bottom Left
Bottom Right
Bottom Center

Left
Right
Center


I tried the test of Nages but there is something not run ok
I tried with BOx and Roundbox( with brush)

ERROR : the text is never printed on the position I selected
as you can see here


Image








this is the test


Code: Select all

#include "fivewin.ch"



Function Test()
local lPrv:=.t.
local oBrush

 local nRow:= 5.5                  ,;
            nCol:= 1                ,;
            nHei:= nRow+0.8         ,;
            nWid:= 5.5              ,;
            cFnt         := "Arial" ,;
            nSiz         := 6       ,;
            lBold        := .T.     ,;
            lItalic      := .F.     ,;
            nColorFont   := CLR_WHITE ,;
            cAlign       := "TL"    ,;
            cTxt:="ABCDEFGH"

local oFnt
local oPrn

DEFINE BRUSH oBrush FILE "c:\fwh\bitmaps\backgrnd\pebbles.bmp"

       oPrn:=PrintBegin("Test Box and RoundBox",.F.,lPrv,,.T.)
       oPrn:SetPortrait()
       PageBegin()

         CursorWait()

         oFnt:=TFont():New(cFnt,0,-nSiz,.F.,lBold,,,,lItalic,,,,,,,oPrn)


    // first test

         oPrn:Box(nRow,nCol,nHei,nWid,  { CLR_BLACK, 0.01 }, CLR_HGRAY, ;
                   { cTxt, oFnt, nColorFont, cAlign }, ;
                     "CM" )



//Second Test
            nRow:= 9.5
            nCol:= 1
            nHei:= nRow+0.8
            nWid:= 5.5

  oPrn:RoundBox(nRow,nCol,nHei,nWid,.5, .5, { CLR_HRED, 0.01 }, oBrush, ;
                  { cTxt, oFnt, nColorFont, cAlign}, ;
                  "CM" )


  oFnt:end()
   RELEASE BRUSH oBrush
       PageEnd()
      PrintEnd()
   CursorArrow()
RETURN NIL
 

Re: oPrn BOX ERROR

Posted: Fri Oct 30, 2020 9:25 am
by nageswaragunupudi
This works from FWH2007 onwards.

Re: oPrn BOX ERROR

Posted: Fri Oct 30, 2020 10:09 am
by Silvio.Falconi
nageswaragunupudi wrote:This works from FWH2007 onwards.
Now I don't remember what version I probably have here in the office I haven't updated the system

Re: oPrn BOX ERROR

Posted: Fri Oct 30, 2020 10:24 am
by Silvio.Falconi
Silvio.Falconi wrote:
nageswaragunupudi wrote:This works from FWH2007 onwards.
Now I don't remember what version I probably have here in the office I haven't updated the system
however it is even stranger because I took a test and it worked, at least at home

Buit I resolved
see the email pls

Re: oPrn BOX ERROR

Posted: Sun Nov 01, 2020 10:53 am
by Silvio.Falconi
nageswaragunupudi wrote:This works from FWH2007 onwards.
Nages,
I make a check
on fwh April on function TxtInRct( hDC, aRect, aText ) there is a "" ( school office version)
on fwh May and June 2020 on function TxtInRct( hDC, aRect, aText ) there is a aRect[4] ( home version)

how do you tell me that this change is from the july (20.07) version?



now I wish the applause of linossi ...