oPrn BOX ERROR

oPrn BOX ERROR

Postby Silvio.Falconi » Fri Oct 30, 2020 9:05 am

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  Expand view

#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
 
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: oPrn BOX ERROR

Postby nageswaragunupudi » Fri Oct 30, 2020 9:25 am

This works from FWH2007 onwards.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10630
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: oPrn BOX ERROR

Postby Silvio.Falconi » Fri Oct 30, 2020 10:09 am

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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: oPrn BOX ERROR

Postby Silvio.Falconi » Fri Oct 30, 2020 10:24 am

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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: oPrn BOX ERROR

Postby Silvio.Falconi » Sun Nov 01, 2020 10:53 am

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 ...
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 85 guests