#include "fivewin.ch"
REQUEST DBFCDX
function Main()
local oDlg, oBrw
USE "C:\FWH\SAMPLES\WWONDERS" NEW VIA "DBFCDX"
DEFINE DIALOG oDlg SIZE 800,600 PIXEL TRUEPIXEL
@ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE "WWONDERS" ;
COLUMNS "NAME", "IMAGE", "DETAILS" ; // Can use AUTOCOLS too
LINES NOBORDER
WITH OBJECT oBrw
:nRowHeight := 100 // pixels
:CreateFromCode()
END
ACTIVATE DIALOG oDlg CENTERED
return nil
#include "fivewin.ch"
function Main()
local oDlg, oBrw
local aData := { { "OLGA1", "c:\fwh\bitmaps\olga1.jpg" }, ;
{ "SEA", "c:\fwh\bitmaps\sea.bmp" } }
DEFINE DIALOG oDlg SIZE 360,500 PIXEL TRUEPIXEL
@ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE aData ;
COLUMNS 1, 2 ; // Can use AUTOCOLS too
HEADERS "NAME", "IMAGE" ;
LINES NOBORDER
WITH OBJECT oBrw
:aCols[ 2 ]:cDataType := "F"
:nRowHeight := 200 // pixels
:CreateFromCode()
END
ACTIVATE DIALOG oDlg CENTERED
return nil
oCol:bEditValue := { || ( cAlias )->IMAGE }
// or
oCol:bEditValue := { || oRs:Fields( "image" ):Value }
oCol:bEditValue := { || MemoRead( cImg ) }
#include "fivewin.ch"
function Main()
local aImages := { "c:\fwh\bitmaps\olga1.jpg", "c:\fwh\bitmaps\sea.bmp" }
local oDlg, oBrw
DEFINE DIALOG oDlg SIZE 750,600 PIXEL TRUEPIXEL
@ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE aImages NOBORDER
WITH OBJECT oBrw:AddCol()
:cHeader := "NAME"
:bEditValue := { || aImages[ oBrw:nArrayAt ] }
:nWidth := 300
END
WITH OBJECT oBrw:AddCol()
:cHeader := "IMAGE"
:bEditValue := { || MemoRead( aImages[ oBrw:nArrayAt ] ) }
:nWidth := 300
END
WITH OBJECT oBrw
:nRowHeight := 200
:CreateFromCode()
END
ACTIVATE DIALOG oDlg CENTERED
return nil
mauri.menabue wrote:Hi Enrico
I have two questions to ask :
1 what is the "detached local" technique.
Can you post an example?
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL aVar := { SPACE( 20 ), SPACE( 20 ) }
LOCAL i
DEFINE DIALOG oDlg
FOR i = 1 TO 2
@ i, 1 GET aVar[ i ]
NEXT
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL aVar := { SPACE( 20 ), SPACE( 20 ) }
LOCAL i
DEFINE DIALOG oDlg
FOR i = 1 TO 2
// @ i, 1 GET aVar[ i ]
MKGET( aVar, i )
NEXT
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL
STATIC FUNCTION MKGET( aVar, i )
@ i, 1 GET aVar[ i ]
RETURN NIL
mauri.menabue wrote:2 how store an image into a memo file.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 46 guests