- 1 - COUNT(DISTINC blobField) - COUNT(blobField)
PUBLIC oform1
oform1 = CREATEOBJECT("form1")
oform1.Show
RETURN
DEFINE CLASS form1 AS form
DoCreate = .T.
Caption = "A demo for Images into a grid"
ADD OBJECT grid1 AS grid WITH Height = m.thisForm.Height - 8 ;
, Left = 4 ;
, Top = 4 ;
, Width = m.thisForm.width - 8 ;
, ColumnCount = 0 ;
, Anchor = 1+2+4+8
PROCEDURE Load
CREATE CURSOR myCursor (blobImage W)
CD HOME(4)+"\Bitmaps\Assorted"
PRIVATE aBmpFiles
FOR k=1 TO ADIR(aBmpFiles,'*.bmp')
INSERT INTO (ALIAS()) VALUES (FILETOSTR(m.aBmpFiles[m.k,1]))
NEXT
GO TOP
CD HOME(0)
ENDPROC
PROCEDURE grid1.Init
this.AddObject('imageColumn','imageColumn')
WITH m.this.imageColumn
.rowImage._Controlsource = m.this.RecordSource+"."+FIELD(1,m.this.RecordSource)
.Visible = .T.
ENDWITH
ENDPROC
ENDDEFINE
DEFINE CLASS imageColumn AS Column
Bound = .F.
Sparse = .F.
ADD OBJECT rowImage AS rowImage
ENDDEFINE
**************************************************
*-- Sketch Class : rowImage
*
DEFINE CLASS rowImage AS image
BackStyle = 0
Stretch = 1 && is it a big job for VFPT to add a Centered option ( no fit, only draw center into Image area ) ?
_Controlsource = "''"
PROCEDURE backstyle_access
this.PictureVal = EVALUATE(m.this._ControlSource)
RETURN m.THIS.BackStyle
ENDPROC
ENDDEFINE
You can comment it ?
I think VFP release internal resource for every PictureVal reassign.
*******************************************
P.S. Randy, i use a best implementation for myAnchor into my VFP8
( this does not demand many modifications on VFP9 C++ code ),
if I adapt it to VFP9 and send to you a explained demo via email,
you take it in consideration, or the VFP9 is frozen and therefore I lose alone time ?
If VFPT not changed Anchor,
I must keep the myAnchor of VFP8 adapted to VFP9, and VFP community opportunity loses one.
Fabio