Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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 this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Integration Management Part 2
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

571 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