More Group Sites
School Rankings
Jobless Net
Better Home
Enviro++


Help | Subscribe/Unsubscribe | Rules | Other Group Sites: Better Education | Better Education Forum
Welcome Guest Search | Active Topics | Members | Log In | Register

Change menu highlight color in Delphi 6 Options · View
hong
Posted: Tuesday, August 04, 2009 4:42:45 AM

Rank: Administration
Groups: Administration

Joined: 11/23/2008
Posts: 329
Points: 693
Location: Australia
Change menu highlight color in Delphi 6

By default, the active menu item background color depends on current Windows theme/settings. However, you can use Owner Drawing to customize it via handling OnDrawItem event of the menu item. OnDrawItem will only occur if the parent menu’s OwnerDraw property is True or the parent menu has a non-nil Images property.

Typically, when creating an owner-drawn menu we start with creating a standard Menu by placing it on a form and setting Menu Items with "Menu Designer". To turn a menu into a fully customized graphical element we have to handle each menu items OnMeasureItem and OnDrawItem event. In the OnMeasureItem event we set the size of owner-draw menu items. The OnDrawItem event is fired when Windows first displays the items and each time the status changes (mouse moves over an item). Find out how to implement a "Bold" menu item in OnDrawItem.


Sponsor
Posted: Tuesday, August 04, 2009 4:42:45 AM
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

ASPNET Theme created by Boskone (Dan Ferguson)
Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.
This page was generated in 0.049 seconds.