Ownerdraw menus with TToolBar

Posted on 2005-02-25
Medium Priority
Last Modified: 2010-04-05

Ownerdraw MainMenu does not work when attached with the Menu property of
TToolbar. How can I get around this problem? I want my menu to be displayed
in toolbar with colors i.e., my OnDrawItem method.


Question by:perthg
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
1 Comment

Accepted Solution

Imthiyaz_ph earned 750 total points
ID: 13409344
Just place an empty TImageList component on the form and assign it to the images property of mainmenu. While painting, it checks whether the menu is ownerDraw using this function:

function TMenu.IsOwnerDraw: Boolean;
  Result := OwnerDraw or (Images <> nil);

Featured Post

Technology Partners: 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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

777 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