Flickering on repaint

Hi!

I have an application with two grids next to each other. Some cells in these two grids are related to each other, so I want to highlight the relatied cell in grid2 if the user moves the mouse over the corresponding cell in grid1. This works fine by checking the cell in grid1.MouseMove, the highlighting is done via grid2.OnGetCellColor. The only problem I have is the flickering of grid2, as I have to call grid2.Repaint every time in grid1.MouseMove.

Any ideas how I could avoid the flickering issue?

Thanks and greetings,
Chris

...I think I solved the problem at leat partially ;) repainting the grid only occurs when really needed, i.e. when the highlighted cell changes. This still produces a very short flickering, but much less then updating on every MouseMove event. Still looking for the perfect solution, any help would be appreciated!
But there's a second problem/question: I'm using a gradient to color the cells, but in OnGetCellColor I can only set one color by abrush.color which looks pretty strange on the cells with a gradient. Can I specify a different gradient (i.e. colorfrom and colorTo) in OnGetCellColor?

Thanks,
Chris

...flickering issue solved... Sorry, was a long day... ;)
Still looking for a solution for the gradient color question, though.

Greets,
Chris

Have you considered using the OnGetCellGradient event?

Haven't considerd but will now ;) It's right below the OnGetCellColor event, how could I miss that?

Sorry for the silly question and thanks for your help,
Chris