Subject Re: [IBO] Display Icon in a Grid
Author Florian Hector
Markus,


> be sure to operate on the query's buffer. If you locate the row to be drawn
> within the buffer with "BufferRowNum := .." then you have to access its
> values with BufferFieldByName (see other BufferXXXX methods, too). The
> normal call to FieldByName will only give you the values of the record
> currently selected in the grid - not the other records that need to be
> drawn, too.


That was exactly it, after changing ...FieldByName('Icon').AssignTo(...) to
...BufferFieldByName('Icon').AssignTo(...) it works nicely.

One question I still have though: The images in the grid appear blurry and with fewer colors than
the actual image. I order to test that the blobstream really contains a nice image, I put a
"bmp.SaveToFile('c:\iconausstream.bmp');" right after assigning the bmp. This file then contains the
right image in a decent quality.
Is there anything I have to set properly with the grid itself?

Thank you again

Florian