Subject | Icons in TIB_Grid |
---|---|
Author | Aleš Kahánek |
Post date | 2002-09-19T15:00:12Z |
Hi,
someone can remember that I was asking about how to draw an icon to a
TIB_Grid on the basis of information stored in certain TIB_Query column. The
solution is very easy to implement, thanks to Harald Klomann and his demo.
There is OnDrawCell event in which you can draw to the cell rectangle, icon
or text or both. This works well, but when the user clicks into the cell and
puts the grid into edit mode, the cell shows the original value and the icon
is not painted.
Example: suppose we have numbers stored in a db table which are indexes of
the icons stored in the TImageList. We do the drawing of the appropriate
icon in the grid, but after entering the mentioned edit mode the icon
dissappears and the focused cell shows the index number. I tried to find any
other event like "OnDrawEditCell" but with no succes. The existing
OnDrawFocusedCell does not help in this situation.
Do you have any idea?
Thank you.
Ales
someone can remember that I was asking about how to draw an icon to a
TIB_Grid on the basis of information stored in certain TIB_Query column. The
solution is very easy to implement, thanks to Harald Klomann and his demo.
There is OnDrawCell event in which you can draw to the cell rectangle, icon
or text or both. This works well, but when the user clicks into the cell and
puts the grid into edit mode, the cell shows the original value and the icon
is not painted.
Example: suppose we have numbers stored in a db table which are indexes of
the icons stored in the TImageList. We do the drawing of the appropriate
icon in the grid, but after entering the mentioned edit mode the icon
dissappears and the focused cell shows the index number. I tried to find any
other event like "OnDrawEditCell" but with no succes. The existing
OnDrawFocusedCell does not help in this situation.
Do you have any idea?
Thank you.
Ales