RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TStandardMenuItem.DrawBackground Method

Draws the background of the menu item.

Pascal
procedure DrawBackground(var PaintRect: TRect); override;
C++
virtual __fastcall DrawBackground(TRect PaintRect);

This method is called automatically when the menu item needs to render its background (everything except the text and glyph). 

PaintRect indicates the dimensions of the menu item on its canvas. 

DrawBackground paints the background of the menu item so that its color reflects whether the item currently has focus, adjusting PaintRect to accommodate any glyph or checkmark that appears on the menu item. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!