More Group Sites
Education Books
School Rankings
Jobless Net
Better Home
Welcome Guest! To enable all features please Login or Register.



Go to last post Go to first unread
#1 Posted : Tuesday, 4 August 2009 12:42:45 AM(UTC)

Rank: Administration


Groups: AcademicCoachingSchool, admin, Administration, BookSeller, CatholicSchool, CoachingAdult, CoachingProfessional, CoachingSports, ExtraCurriculumCoaching, IndependentSchool, Moderator, MusicTeacher, PrivateSchool, PublicSchool, SelectiveSchool, tutor
Joined: 23/11/2008(UTC)
Posts: 522

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.

Rss Feed  Atom Feed
Users browsing this topic
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.