fraxzi wrote:Dear Mr. Uwe,
Can you make a BLOB version sample?
Kind Regards,
Frances
nageswaragunupudi wrote:fraxzi wrote:Dear Mr. Uwe,
Can you make a BLOB version sample?
Kind Regards,
Frances
Are you reading from ADS or MySql?
If you are reading image buffer from some datasource, please assign oCol:bEditvalue := { || <expression_returning_imagebuffer> } and set oCol:cDataType := 'P'
Try this with a normal browse first. Then we can program any variations like this.
...
...
@ 10, 300 SELEX nOption1 SIZE 145, 35 PIXEL;
ITEMS "1&00", "1&20", "&1&40", "1&60", "1&80", "2&00", "&Full";
GRADIENT OUTTRACK { { 0.5, 16770250, 16312263 }, ;
{ 0.5, 16312263, 16770250 } } ;
GRADIENT INTRACK { { 0.5, 8388608, 16312263 }, ;
{ 0.5, 16312263, 8388608 } } ;
THUMBSIZE 40, 25 ROUNDSIZE 10 ;
COLOR THUMB 14853684 ;
COLORTEXT 128, 32768 ;
TITLE "Cell-Size" TOP ;
FONT oFont1 ;
ACTION( IIF( nOption1 = 1, nCellSize := 100, NIL ), ;
IIF( nOption1 = 2, nCellSize := 120, NIL ), ;
IIF( nOption1 = 3, nCellSize := 140, NIL ), ;
IIF( nOption1 = 4, nCellSize := 150, NIL ), ;
IIF( nOption1 = 5, nCellSize := 160, NIL ), ;
IIF( nOption1 = 6, nCellSize := 200, NIL ), ;
IIF( nOption1 = 7, nCellSize := 400, NIL ), ;
CELL_ADJUST( oBrw2, nOption1 ) ) ;
COLORTITLE 0
...
...
// ------------------------
FUNCTION CELL_ADJUST( oBrw2, nOption1 )
LOCAL oCol
FOR nCol := 1 to Len( oBrw2:aCols )
WITH OBJECT oBrw2:aCols[ nCol ]
:nWidth := nCellSize
:bPaintText := { | oCol, hDC, cData, aRect, aColors, lHighLite | ;
DrawCell( oCol, hDC, cData, aRect, aColors, lHighLite ) }
END
NEXT
oBrw2:nRowHeight := nCellSize + 20
oBrw2:Refresh()
RETURN( NIL )
Is it possible to define a fixed Position ?
@ 30, 15 BTNBMP oBtn0 OF oDlg1 ;
SIZE 100, 40 ;
PROMPT " &Select " + CRLF + " Directory" FILE c_path + "\Bitmaps\Preview.bmp" 2007 ;
FONT oTxtfont LEFT ;
ACTION ( cSUBDIR := cGetDir( "Select a directory",;
CurDrive() + ":\" + GetCurDir() ) + "\", ;
oSUBDIR:Refresh() , ;
aImg := ReadImages( cSUBDIR ), oBrw2:End(), SHOW_BROW(oDlg1) )
...
@ 75, 120 SELEX oSelex5 VAR nOption5 SIZE 175, 30 PIXEL;
ITEMS "&100%", "&150%", "&200%", "&400%", "&500%", "&Copy", "&Disabl." ;
GRADIENT OUTTRACK { { 0.5, 16770250, 16312263 }, ;
{ 0.5, 16312263, 16770250 } } ;
GRADIENT INTRACK { { 0.5, 8388608, 16312263 }, ;
{ 0.5, 16312263, 8388608 } } ;
THUMBSIZE 40, 25 ROUNDSIZE 10 ;
COLOR THUMB 14853684 ;
COLORTEXT 128, 32768 ;
TITLE "Image-Action on left Click" TOP ;
FONT oTxtfont ;
ACTION ( IIF( nOption5 = 6, MsgAlert( "Image-copy selected","Attention " ), NIL ), ;
IIF( nOption5 = 7, MsgAlert( "Cell-function disabled","Attention " ), NIL ) ) ;
COLORTITLE 0
...
...
FUNCTION IMG_ZOOM()
LOCAL oDlg, oImage, oBrush, nWidth, nHeight, cFactor
DEFINE IMAGE oImage FILE cImgname
// DEFINE BRUSH oBrush FILE c_path + "\Bitmaps\STONE.BMP"
IF nOption5 = 1
nWidth := oImage:nWidth()
nHeight := oImage:nHeight()
cFactor := "100 %"
ENDIF
IF nOption5 = 2
nWidth := oImage:nWidth() * 1.5
nHeight := oImage:nHeight() * 1.5
cFactor := "150 %"
ENDIF
IF nOption5 = 3
nWidth := oImage:nWidth() * 2
nHeight := oImage:nHeight() * 2
cFactor := "200 %"
ENDIF
IF nOption5 = 4
nWidth := oImage:nWidth() * 4
nHeight := oImage:nHeight() * 4
cFactor := "400 %"
ENDIF
IF nOption5 = 5
nWidth := oImage:nWidth() * 5
nHeight := oImage:nHeight() * 5
cFactor := "500 %"
ENDIF
DEFINE DIALOG oDlg TITLE cFactor FROM 50, 50 TO nHeight + 50, nWidth + 50 PIXEL // TRANSPARENT
oBrush := TBrush():new( ,,,, ResizeBmp( oImage:hBitmap, nWidth, nHeight, .T. ) )
oDlg:Setbrush( oBrush )
ACTIVATE DIALOG oDlg
oImage:End()
RETURN( NIL )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot], Rick Lipkin and 60 guests