Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

bitmap in stringgrid

Posted on 1997-05-16
2
Medium Priority
?
557 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 100 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
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 is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

719 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