Subject | CtrlGrid usage |
---|---|
Author | Lele Gaifax |
Post date | 2002-02-19T10:14:15Z |
Hi all,
I have to show a series of images, and CtrlGrid seemed a natural
choice. The problem is that in the DB there is just the pathname of
the image as a varchar(128), not the blob of image itself. I did hope
that CtrlGrid's OnPaintPanel was up to the job, basically performing a
image1.Picture.LoadFromFile(qry.BufferFields.ByName ('IMG'.asString),
where image1 is a TImage embedded in the grid's panel. I obtained
strange results, varying from seeing the very same image on all the
panels, to nothing at all.
Is it at all possible to embed non-IBO controls in CtrlGrid? Is there
a way to use a TIB_Image instead? I tried to add a BLOB as computed
field, doing a AField.LoadFromFile in the OnCalc event, but it raised
an exception...
thanx a lot,
bye, lele.
--
nickname: Lele Gaifax | Quando vivro' di quello che ho pensato ieri
real: Emanuele Gaifas | comincero' ad aver paura di chi mi copia.
email: lele@... | -- Fortunato Depero, 1929.
I have to show a series of images, and CtrlGrid seemed a natural
choice. The problem is that in the DB there is just the pathname of
the image as a varchar(128), not the blob of image itself. I did hope
that CtrlGrid's OnPaintPanel was up to the job, basically performing a
image1.Picture.LoadFromFile(qry.BufferFields.ByName ('IMG'.asString),
where image1 is a TImage embedded in the grid's panel. I obtained
strange results, varying from seeing the very same image on all the
panels, to nothing at all.
Is it at all possible to embed non-IBO controls in CtrlGrid? Is there
a way to use a TIB_Image instead? I tried to add a BLOB as computed
field, doing a AField.LoadFromFile in the OnCalc event, but it raised
an exception...
thanx a lot,
bye, lele.
--
nickname: Lele Gaifax | Quando vivro' di quello che ho pensato ieri
real: Emanuele Gaifas | comincero' ad aver paura di chi mi copia.
email: lele@... | -- Fortunato Depero, 1929.