Page 1 of 1
Correcion...xBrowse...Fwh 907.....909
Posted: Thu Nov 05, 2009 10:59 pm
by Ale SB
Ola Antonio,
por favor revise el method DataRect() del xBrowse (Vrs. Fwh907...909..)
Code: Select all | Expand
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=17134Saluds, Ale
Re: Correcion...xBrowse...Fwh 907.....909
Posted: Thu Nov 05, 2009 11:28 pm
by Antonio Linares
Ale,
Incluido para el próximo FWH 9.11, muchas gracias!

Re: Correcion...xBrowse...Fwh 907.....909
Posted: Sat Nov 07, 2009 7:04 am
by Antonio Linares
Ale,
Podrias proporcionarnos un ejemplo de PRG y RC que reproduzcan el error de pintado que tenias, antes de implementar tus cambios ? gracias
Re: Correcion...xBrowse...Fwh 907.....909
Posted: Sun Nov 08, 2009 2:47 pm
by Ale SB
Antonio;
Encontrado el verdadero problema.
Pruebas se basan en Fwh909 ==>

El defecto Footer:

El defecto header:

Solución, a los cambios en xBrowse :
Code: Select all | Expand
METHOD Paint() CLASS TXBrowse
.
.
// Paint Background
aRect := ::DataRect()
SetBrushOrgEx( ::hDC, aRect[ 2 ], aRect[ 1 ] )
//FillRect( ::hDC, aRect, ::oBrush: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: Select all | Expand
/*
* 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: Select all | Expand
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