FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Correcion...xBrowse...Fwh 907.....909
Posts: 248
Joined: Wed Jan 11, 2006 11:30 AM
Correcion...xBrowse...Fwh 907.....909
Posted: Thu Nov 05, 2009 10:59 PM
Ola Antonio,
por favor revise el method DataRect() del xBrowse (Vrs. Fwh907...909..)

Code (fw): Select all Collapse
METHOD DataRect() CLASS TXBrowse

   local aRect    := GetClientRect( ::hWnd )

   if ::lRecordSelector
      //aRect[ 2 ]  += RECORDSELECTOR_WIDTH
      aRect[ 2 ]  -= RECORDSELECTOR_WIDTH  //--> Ale SB
   endif
   if ::lHeader
      aRect[ 1 ]  += ::HeaderHeight()
   endif
   if ::lFooter
      //aRect[ 3 ]  -= ::FooterHeight()
      aRect[ 3 ]  += ::FooterHeight()  //--> Ale SB
   endif

return aRect


Esta alteraçao corrigi este Bug :
viewtopic.php?f=6&t=17134

Saluds, Ale
aleseribeli@hotmail.com

FwH, Hb Svn, ADS 8.1, ADS 10, Pelles C, FwPPC, MsVc 2008, MsVc 2010
"Conhecimento, você não subtrai quando divide; mas soma e multiplica."
**---Mário Persona---**
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Correcion...xBrowse...Fwh 907.....909
Posted: Thu Nov 05, 2009 11:28 PM

Ale,

Incluido para el próximo FWH 9.11, muchas gracias! :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Correcion...xBrowse...Fwh 907.....909
Posted: Sat Nov 07, 2009 07:04 AM

Ale,

Podrias proporcionarnos un ejemplo de PRG y RC que reproduzcan el error de pintado que tenias, antes de implementar tus cambios ? gracias

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 248
Joined: Wed Jan 11, 2006 11:30 AM
Re: Correcion...xBrowse...Fwh 907.....909
Posted: Sun Nov 08, 2009 02:47 PM
Antonio;

Encontrado el verdadero problema.

Pruebas se basan en Fwh909 ==>


El defecto Footer:


El defecto header:


Solución, a los cambios en xBrowse :
Code (fw): Select all Collapse
METHOD Paint() CLASS TXBrowse
.
.
   // Paint Background
   aRect       := ::DataRect()
   SetBrushOrgEx( ::hDC, aRect[ 2 ], aRect[ 1 ] )
   //FillRect( ::hDC, aRect, ::hBrush )
   //--> El aRect[1] := 0 y aRect[2] := 0,  tenes q ser 0.
   //    Correcion del Header.
    FillRect( ::hDC, GetClientRect( ::hWnd ), ::oBrush:hBrush )  //--> Ale SB
   // Paint Background end
.
.
.
   /*
   Paint Footer
   */

   if ::lFooter
      if !lOnlyData
         //nHeight  := ::nFooterHeight - 3
         //--> Correcion del Footer.
         nHeight  := ::nFooterHeight - 1  //--> Ale SB


Después de las correcciones:


El footer, no defeito :


Prueba:
Code (fw): Select all Collapse
/*
* testxbr.prg
*/

#include "FiveWin.Ch"
#include "XBrowse.Ch"

REQUEST DBFCDX

//----------------------------------------------------------------------------//

function Main()

  local oDlg, oBrw
   
  rddsetdefault( "DBFCDX" ) 
  CheckCustCdx()

  DEFINE DIALOG oDlg RESOURCE "DIALOG_1" TITLE "Test xBrwose"

*****--- Browse ---*************************************************************
    oBrw := TXBrowse():New( oDlg )    
             oBrw:CreateFromResource( 101 )
            oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLROW
            oBrw:nColDividerStyle := LINESTYLE_BLACK
            oBrw:cAlias           := ("CUSTOMER")      
            oBrw:lFooter          := .T.
            oBrw:lHScroll         := .F.
            
  ACTIVATE DIALOG oDlg CENTERED
 
return

//----------------------------------------------------------------------------//
static function CheckCustCdx()

   local n

   if File( "customer.cdx" )
      FErase( "customer.cdx" )
   endif

   if !File( "customer.cdx" )
      USE CUSTOMER EXCLUSIVE VIA "DBFCDX"
      for n := 1 to FCount()
         CreateTag( FieldName( n ), FieldType( n ) )
      next
    endif

return nil

//----------------------------------------------------------------------------//

static function CreateTag( ctag, cType )

   PRIVATE cExpr

   if cType == 'C'
      cExpr    := "UPPER(" + Trim( cTag ) + ")"
      INDEX ON &cExpr TAG &cTag
   else
      INDEX ON &ctag TAG &ctag
   endif

return nil


Testxbr.Rc
Code (fw): Select all Collapse
DIALOG_1 DIALOG 6, 15, 349, 190
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX
CAPTION "DIALOG_1"
FONT 8, "MS Sans Serif"
{
 CONTROL "", 101, "Txbrowse", 0 | WS_CHILD | WS_VISIBLE, 12, 8, 325, 171
}


Saluds, Ale
aleseribeli@hotmail.com

FwH, Hb Svn, ADS 8.1, ADS 10, Pelles C, FwPPC, MsVc 2008, MsVc 2010
"Conhecimento, você não subtrai quando divide; mas soma e multiplica."
**---Mário Persona---**

Continue the discussion