Solved

bitmap in stringgrid

Posted on 1997-05-16
2
556 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses
Course of the Month9 days, 15 hours left to enroll

623 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