static function orderoverzicht()
local oDlg, oFont, oBrw,cfactart := "dial", nWild := 2, aDbf[ADIR("*.jpg")]
local cList, aFlds, aHdrs, oBold
local nChoice, uDataSource, nCombo1:= 1 , nCombo2:= 1
USE nofoto NEW
ADIR("*.jpg", aDbf)
aStruct := {}
AADD(aStruct, { "foto", "C", 150, 0 }) // Id
AADD(aStruct, { "pic", "C", 150, 0 }) // Id
AADD(aStruct, { "path", "C", 150, 0 }) // Id
DbCreate( "fotofile.dbf", aStruct)
use fotofile NEW ALIAS foto VIA "DBFCDX"
DBSELECTAREA( "foto" )
for i = 1 to len(adbf)
foto->(dbappend())
foto->foto = adbf[i]
foto->pic = alltrim("c:\fwpic\"+adbf[i])
foto->path = alltrim("c:\fwpic\"+adbf[i])
next
INDEX ON foto->foto TAG foto // DESCENDING
foto->(dbgotop())
xbrowse()
DBSELECTAREA( "nofoto" )
cList := "foto"
DEFINE FONT oBold NAME 'TAHOMA' SIZE 0,-12 BOLD
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-12
DEFINE DIALOG oDlg RESOURCE "orderdlg";
TITLE "Fotolijst zonder foto : "
aFlds := aHdrs := HB_ATokens( cList, ',' )
REDEFINE XBROWSE oBrw ID 200 OF oDlg ;
DATASOURCE "nofoto" ;
COLUMNS "ID","naam","pagina","RefLev","Kleur","Source" ;
COLSIZES 150,250,100,150,150,450 ;
AUTOSORT CELL LINES NOBORDER FASTEDIT
oBrw:bRClicked := { || XbrShowSizes( oBrw ) }
WITH OBJECT oBrw
:nColDividerStyle := LINESTYLE_LIGHTGRAY
:nRowDividerStyle := LINESTYLE_LIGHTGRAY
:bClrRowFocus := { || { CLR_BLACK, RGB(185,220,255) } }
:nMarqueeStyle := MARQSTYLE_HIGHLROWMS
:bChange := { || SET_SCOPE(oStru), ('foto')->(DBGOTOP()),oStru:Refresh() }
END
aDir := DIRECTORY( "c:\fwpic\*.jpg" )
AEval( aDir, { |a| a[ 2 ] := "c:\fwpic\" + a[ 1 ] } )
REDEFINE XBROWSE oStru ID 320 OF oDlg ;
DATASOURCE "foto" ;
COLUMNS "foto","Pic","Path" ;
COLSIZES 200,150,200 ;
CELL LINES NOBORDER FASTEDIT
oStru:aCols[ 2 ]:cDatatype := "F"
oStru:nWidths := 170
oStru:nRowHeight := 170
*/
/*
REDEFINE XBROWSE oStru ID 320 OF oDlg ;
DATASOURCE aDir ;
COLUMNS 1,2 ;
COLSIZES 500,150 ;
CELL LINES NOBORDER FASTEDIT
oStru:aCols[ 2 ]:cDataType := 'F'
oStru:nWidths := 170
oStru:nRowHeight := 170
*/
WITH OBJECT oStru
:lIncrFilter := .t.
:lSeekWild := ( nWild == 2 )
:cFilterFld := "foto"
:bClrSel := { || { CLR_BLACK, CLR_HGRAY }}
:l2007 := .t.
END
// REDEFINE BUTTON ID 101 OF oDlg ACTION (oStru:seek(""),('foto')->(DBGOTOP()),oStru:SetFocus())
REDEFINE BUTTON ID 101 OF oDlg ACTION (("foto")->( ORDSCOPE(1, "" ) ),('foto')->(DBGOTOP()),oStru:SetFocus())
REDEFINE BUTTON ID 350 OF oDlg ACTION (oStru:seek(""),SET_SCOPE(oStru),('foto')->(DBGOTOP()),oStru:SetFocus())
REDEFINE COMBOBOX oStru:cFilterFld ID 100 of oDLG ;
ITEMS aHdrs ;
ON CHANGE ( oStru:Seek( "" ), oStru:SetFocus() )
REDEFINE COMBOBOX nWild ID 110 of oDLG ;
ITEMS { "Start met", "Bevat tekst" } ;
ON CHANGE ( oStru:lSeekWild := ( nWild == 2 ), ;
oStru:Seek( If( oStru:lSeekWild, oStru:cSeek, "" ) ), ;
oStru:SetFocus() )
//SET_SCOPE(oStru)
REDEFINE say ostru:oSeek prompt ostru:cSeek ID 650 OF oDlg COLOR CLR_BLACK,CLR_YELLOW PICTURE '@!' UPDATE
ACTIVATE DIALOG oDlg CENTERED on init ( SET_SCOPE(oStru),oBrw:setfocus(),oStru:refresh(),odlg:update() )
RELEASE FONT oFont
close all
return nil
STATIC FUNCTION SET_SCOPE(oStru)
LOCAL cNName := alltrim(nofoto->reflev)
DBSELECTAREA( "foto" )
("foto")->( ORDSCOPE(0, cNName ) )
("foto")->(ORDSCOPE(1, cNName ) )
oStru:Refresh()
RETURN NIL