Subject Re: Using color in IB_Grid
Author stanw1950 <>

I had the exact same problem. I used a tib_grid with a tib_query
where the query would return up to 3000 records depending on what
filter the user selected. I used both the OnGetCellProps and the
OnDrawCell events to change the brush color, the font color, and to
draw various bmp's in the grid. I found that if I just showed the
data without changing anything, then the performance was acceptable,
but as I added more colors and bitmaps the grid became slower and
slower until the performance was unacceptable. Like you, I could see
it repaint every cell. I couldn't figure out a solution, so I rewrote
it with a tibotable and a tdbgrid where all the coloring and bmp's
are done in the OnDrawColumnCell event. Now the performance is fine.
The only drawback was the first opening of the table (which was very
slow), but that problem was solved using schema caching. It will be
interesting to see if someone has a "native" solution to the native
component problem that you have. Good luck.

Stan Walker

--- In, Ólafur Guðmundsson <og@v...> wrote:
> Hi.
> I'm trying out the OnGetCellProps to color cells in my IB_Grid.
> This is working ok but I'm having some trouble with the speed. I
use the
> grid to display and update data and every time I update data in one
row I
> see the coloring refreshing from top to bottom. I / the user gets
> feeling that the application is very slow then he can see every row
> refreshed.
> Is there some way I can speed this up or hide the coloring until
the refresh
> is done?
> If you need more info let me know.
> Regards
> Olafur