• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 592
  • Last Modified:

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

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
bcbproblems
Asked:
bcbproblems
1 Solution
 
saneesh100Commented:
Just try to change the bg bitmap permanently for the status window..
0
 
timopCommented:
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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now