Antonio;
Encontrado el verdadero problema.
Pruebas se basan en Fwh909 ==>
![Image](http://img33.imageshack.us/img33/5940/xbrw1.jpg)
El defecto Footer:
![Image](http://img9.imageshack.us/img9/9272/xbrw2.jpg)
El defecto header:
![Image](http://img503.imageshack.us/img503/8728/xbrw3.jpg)
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:
![Image](http://img340.imageshack.us/img340/6323/xbrw4.jpg)
El footer, no defeito :
![Image](http://img26.imageshack.us/img26/5616/xbrw5.jpg)
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
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---**