Solved

bitmap in stringgrid

Posted on 1997-05-16
2
534 Views
Last Modified: 2010-04-03
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
0
Comment
Question by:Darryl050597
2 Comments
 
LVL 4

Expert Comment

by:erajoj
ID: 1336325
In what way have you put the TBitmap on/in the TStringGrid?
0
 
LVL 1

Accepted Solution

by:
ygolan earned 50 total points
ID: 1336326
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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now