FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Methot SAY in TRLIN --- REPORT
Posts: 181
Joined: Thu Apr 17, 2008 02:38 PM

Methot SAY in TRLIN --- REPORT

Posted: Mon May 15, 2023 09:11 AM
hi all

in the say method of the TRLIN class the pointing index of the aClrText array is
the one defined in aFont this causes some lines to have incorrect colors the problem
is when the color selected is white therefore it seems that certain lines are no longer printed
Code (fw): Select all Collapse
METHOD Say(nStartRow) CLASS TRLine

     LOCAL nFor, nCol, nWidth

     DEFAULT nStartRow := 0


     IF eval(::aLine[1]) == ""
          RETU NIL
     ENDIF

     FOR nFor := 1 TO len(::aLine )

          nWidth := ::oReport:oDevice:GetTextWidth(eval(::aLine [nFor]),;
                    ::oReport:aFont[eval(::aFont[nFor])])

          DO CASE
               CASE ::aPad[nFor] == RPT_LEFT
                    nCol := ::nCol
               CASE ::aPad[nFor] == RPT_RIGHT
                    nCol := ::oReport:nMargin+;
                            ::oReport:nRptWidth-;
                            nWidth
               CASE ::aPad[nFor] == RPT_CENTER
                    nCol := ::oReport:nMargin+;
                            Int(::oReport:nRptWidth/2)-;
                            Int(nWidth/2)
               OTHERWISE
                    nCol := ::nCol
          ENDCASE

          ::oReport:oDevice:Say(::aRow[nFor]+nStartRow ,;
                                nCol ,;
                                eval(::aLine [nFor]),;
                                ::oReport:aFont[eval(::aFont[nFor])] ,;    <========::aFont[nFor])===============
                                NIL ,;
                                ::oReport:aClrText[eval(::aFont[nFor])])  <========::aFont[nFor])===============

     NEXT

RETURN NIL
TIA

Continue the discussion