karinha wrote:No comprendo. ¿Tienes un ejemplo completo para probar?
Saludos.
Gracias por responder.
#include 'fivewin.ch'
REQUEST DBFCDX
//----------------------------------------------------------------------------//
function Main()
local oWnd, oBar
SET DATE ITALIAN
SET CENTURY ON
RDDSETDEFAULT( "DBFCDX" )
DEFINE WINDOW oWnd MDI
DEFINE BUTTONBAR oBar OF oWnd SIZE 45,45 2007
DEFINE BUTTON OF oBar PROMPT "TEST" CENTER ACTION Test()
oWnd:oWndClient:bPainted := {||oWnd:oWndClient:DrawImage( "c:\fwh\bitmaps\logo.bmp", "BR" )}
ACTIVATE WINDOW oWnd
return nil
Function Test()
local oDlg, oBrw, oFont, nWild := 2
local cList, aFlds, aHdrs
local nChoice, uDataSource
local cAlias,oWndChild
cList := "First,Last,Street,State,HireDate"
cAlias = cGetNewAlias( cFileNoExt("CUSTOMER.DBF" ) )
USE CUSTOMER SHARED NEW ALIAS (cAlias)
SET ORDER TO TAG FIRST
GO TOP
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-12
DEFINE DIALOG oDlg SIZE 750,300 PIXEL FONT oFont ;
TITLE "XBrowse Incremental Filters"
aFlds := aHdrs := HB_ATokens( cList, ',' )
@ 30,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg ;
COLUMNS aFlds HEADERS aHdrs ;
DATASOURCE (cAlias) AUTOSORT CELL LINES NOBORDER
WITH OBJECT oBrw
:lIncrFilter := .t.
:lSeekWild := ( nWild == 2 )
:cFilterFld := "FIRST"
:nStretchCol := STRETCHCOL_WIDEST
END
@ 10, 10 COMBOBOX oBrw:cFilterFld ;
ITEMS aHdrs ;
ON CHANGE ( oBrw:Seek( "" ),
oBrw:SetFocus() ) ; // DEBE RETORNAR A oBrw
SIZE 50,400 PIXEL OF oDlg
@ 10, 70 COMBOBOX nWild ITEMS { "Starting With", "Containing" } ;
ON CHANGE ( oBrw:lSeekWild := ( nWild == 2 ), ;
oBrw:Seek( If( oBrw:lSeekWild, oBrw:cSeek, "" ) ), ;
oBrw:SetFocus() ) ;
SIZE 70,400 PIXEL OF oDlg
@ 11,160 SAY oBrw:oSeek PROMPT oBrw:cSeek SIZE 200,10 PIXEL ;
OF oDlg COLOR CLR_BLACK,CLR_YELLOW PICTURE '@!'
oBrw:CreateFromCode()
oDlg:oClient := oBrw
oDlg:bPostEnd := { || DbCloseArea() }
ACTIVATE DIALOG oDlg
AS MDICHILD SETUP oWndChild := oWnd // SIN ESTA INSTRUCCIÓN LO HACE CORRECTAMENTE
return nil
Saludos.