Solved

How to display an icon on the TStatusBar in C++Builder?

Posted on 1998-08-10
2
555 Views
Last Modified: 2012-06-27
How to display an icon (TBitmap or one image from TImageList and the like) on the TStatusBar in C++Builder? We tried to use method PaintTo of TStatusBar, but not successful.

Thanks.
0
Comment
Question by:bcbproblems
2 Comments
 
LVL 1

Expert Comment

by:saneesh100
ID: 1169831
Just try to change the bg bitmap permanently for the status window..
0
 
LVL 1

Accepted Solution

by:
timop earned 200 total points
ID: 1169832
You must handle the event OnDrawPanel.
OnDrawPanel occurs only if the status panel's Style property is set to psOwnerDraw.

For example, to display an image from TImageList, call ImageList.Draw( StatusBar.Canvas, … ) from the OnDrawPanel  event handler.

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

911 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

22 Experts available now in Live!

Get 1:1 Help Now