Solved

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

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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

717 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