Eanfotoselect and the parameter is a part of the jpg file
- Code: Select all Expand view
WITH OBJECT :Cover
:nEditType := EDIT_GET_BUTTON
:bStrImage := { || getorgfoto(webshop->orgfoto) }
:bEditBlock := { |r,c,oCol| EanfotoSelect( oCol:Value ) }
:oDataFont := oFontXS
:nDataStrAlign := AL_CENTER + AL_BOTTOM
:nDataBmpAlign := AL_CENTER
END
When I hit the button the function is called and I can select the picture that I want. I have to close this dialog to go back to the first xbrowse, select a second field and do the process all over
The function is called, filters are set again, I select, need to close the dialog and keep going on...
I would like that the function eanfotoselect is called onces and stay on the screen. select a picture from it and return to the first browse while this lookup dialog stays on screen. Go to a other field in the first browse and select direct from the onscreen dialog and keep doing this until I close the dialog.
- Code: Select all Expand view
static function eanfotoSelect( nCode )
local nSelect
local oDlg, oBrwF, oFont
local lNewZoek := .F.
aDir := DIRECTORY( "D:\PICTURES\TOEVOEGEN\TODO\*.JPG" )
AEval( aDir, { |a| a[ 2 ] := "D:\PICTURES\TOEVOEGEN\TODO\" + a[ 1 ] } )
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE DIALOG oDlg SIZE 1300,800 PIXEL FONT oFont TITLE "Bestand met alle foto's"
@ 10,320 XBROWSE oBrwL SIZE 300,-70 PIXEL OF oDlg ;
DATASOURCE aDir;
COLUMNS 1, 2;
COLSIZES 450,100 ;
CELL LINES NOBORDER AUTOSORT
WITH OBJECT oBrwL
:bLDblClick := { || nSelect := oBrwL:oCol(1):value, oDlg:End() }
:bKeyChar := { |nKey| If( nKey == VK_RETURN, ;
( nSelect := oBrwL:oCol(1):value, oDlg:End() ), nil ) }
END
filterdata(nCode)
oBrwL:nRowHeight:= 100
oBrwL:aCols[ 2 ]:cDatatype := "F"
oBrwL:aCols[ 2 ]:nDataBmpAlign := AL_CENTER
oBrwL:CreateFromCode()
ACTIVATE DIALOG oDlg AS MDICHILD CENTERED
RELEASE FONT oFont
return nSelect