Solved

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

Posted on 1998-08-10
2
569 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
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.

837 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