bitmap in stringgrid

Does anyone know how to reset the focus of a bitmap in a stringgrid when the user scrolls out of the row&Column and then returns, how do I get he focus back to repaint the bitmap??

eg:
I place a bitmap at Cells[5,5], when the user scrolls say to 5,25 which then places the cell[5,5] outside the view area.

How do I get the bitmap back in focus when the user returns to cell[5,5] or a closeby cell????

regards Darryl
Darryl050597Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ygolanConnect With a Mentor Commented:
You don't need to put the focus on the bitmap in order for it to be painted. Here is the code that makes sure the bitmap will be painted when cell[5,5]is in view :

Use the grid'd OnDrawCell event with the following code :

MyStringGrid.Canvas.Draw(Rect.Left, Rect.Top, MyBitmap);
0
 
erajojCommented:
In what way have you put the TBitmap on/in the TStringGrid?
0
All Courses

From novice to tech pro — start learning today.