by Ale SB » Sun Nov 08, 2009 2: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: Select all Expand view RUN
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 view RUN
/*
* 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 view RUN
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.comFwH, 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---**