FUNCTION ViewImages( oDlg )
LOCAL aFiles := {}
LOCAL aImages := {}
LOCAL nCount := 0
LOCAL oWnd
LOCAL oCF
aFiles := DIRECTORY("IMAGES\" + Alltrim( Str( TRANSFIL->(RECNO()), 8, 0) ) + "*.JPG")
IF !Empty( aFiles )
FOR nCount := 1 to Len( aFiles )
? "IMAGES\" + aFiles[nCount,1]
Aadd( aImages, TImage():Define( , "IMAGES\" + aFiles[nCount,1], oDlg ) )
NEXT
ENDIF
IF !Empty( aImages )
DEFINE WINDOW oWnd FROM 2, 2 TO 40, 96 color CLR_BLACK, CLR_CYAN
oWnd:Center()
oCF = TCoverFlow():New( 30, 30 )
// oCF:bAction = { | o, nCover, nOld | msginfo( "Seleted: " + str( nCover, 2 ) + CRLF + "From: " + str( nold ) ) }
oCF:nMaxCover = 5
oCF:lAnimated= .T.
oCF:SetColor( 0, CLR_BLACK )
FOR nCount := 1 TO Len( aImages )
oCF:AddCoverH( aImages[nCount], aFiles[nCount, 1], CLR_WHITE )
NEXT
oWnd:oClient = oCF
ACTIVATE WINDOW oWnd on init( oCF:Resize(), oCF:Refresh() )
ENDIF
RETURN NIL
FUNCTION ViewImages( oDlg )
LOCAL aFiles := {}
LOCAL aImages := {}
LOCAL nCount := 0
LOCAL oImage
LOCAL oWnd
LOCAL oCF
aFiles := DIRECTORY("IMAGES\" + Alltrim( Str( TRANSFIL->(RECNO()), 8, 0) ) + "*.JPG")
IF !Empty( aFiles )
FOR nCount := 1 to Len( aFiles )
oImage := TImage():New( , , , , , , ,oDlg)
oImage:cBmpFile := "IMAGES\" + aFiles[nCount,1]
oImage:LoadBmp( "IMAGES\" + aFiles[nCount,1] )
Aadd( aImages, oImage:hBitmap )
NEXT
ENDIF
IF !Empty( aImages )
DEFINE WINDOW oWnd FROM 2, 2 TO 40, 96 color CLR_BLACK, CLR_CYAN
oWnd:Center()
oCF = TCoverFlow():New( 30, 30 )
// oCF:bAction = { | o, nCover, nOld | msginfo( "Seleted: " + str( nCover, 2 ) + CRLF + "From: " + str( nold ) ) }
oCF:nMaxCover = 5
oCF:lAnimated= .T.
oCF:SetColor( 0, CLR_BLACK )
FOR nCount := 1 TO Len( aImages )
oCF:AddCoverH( aImages[nCount], aFiles[nCount, 1], CLR_WHITE )
NEXT
oWnd:oClient = oCF
ACTIVATE WINDOW oWnd on init( oCF:Resize(), oCF:Refresh() )
ENDIF
RETURN NIL
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 80 guests