I saw allready the sample xbsortcb.prg I inser a get to search into xbrowse but with no success
on function ArrBrw( aData ) the command COMBOBOX oBrw:oSortCbx not order the columns
- Code: Select all Expand view
- function Main()
local aData
FERASE( "CUSTOMER.CDX" )
USE CUSTOMER NEW EXCLUSIVE VIA "DBFCDX"
// aData := FW_DbfToArray( "FIRST,LAST,STREET", , { || RECNO() < 11 } )
aData := FW_DbfToArray( "FIRST,LAST,STREET" )
GO TOP
FW_CdxCreate()
CLOSE CUSTOMER
* Usage1()
*Usage2()
ArrBrw( aData )
return nil
function ArrBrw( aData )
local oDlg, oBrw
local cSeek:=Space(100) //bysilv
local oGet
DEFINE DIALOG oDlg SIZE 800,400 PIXEL TRUEPIXEL RESIZABLE
@ 10, 165 GET oGet VAR cSeek SIZE 200,19 PIXEL OF oDlg PICTURE "@!" //bysilv
@ 60,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE aData ;
AUTOCOLS ;
HEADERS "NAME","SURNAME","ADDRESS" ;
AUTOSORT ;
NOBORDER LINES
WITH OBJECT oBrw
:nMarqueeStyle := 2
:nColorBox := CLR_HRED
:lHScroll := .f. //bysilv
:lIncrFilter := .t. //bysilv
:bOnSort := { |b,oCol| oBrw:Seek( "" ), ; //bysilv
oBrw:cFilterFld := oCol:cExpr, ; //bysilv
oBrw:SetFocus() } //bysilv
:oSeek := oGet //bysilv
:CreateFromCode()
END
@ 10,20 COMBOBOX oBrw:oSortCbx VAR oBrw:cSortOrder SIZE 100,400 PIXEL OF oDlg
ACTIVATE DIALOG oDlg CENTERED
return nil
If I make a search on get sample "Dav " then the EXE crash , the exe go out ( no log file, no Hb_out file)