TMlSkinMenu
The menu skinning component: it repaints the form's main menu and context menus as image-based skinned menus.
Notes
- Every form that needs skinned menus must carry one. It takes over the drawing of all TMainMenu and TPopupMenu components on that form — leave it out and the menus stay grey system menus.
Menu_bkis the menu background,Menu_hilightthe highlight bar, and separate properties supply the check mark, radio mark and submenu arrow.GlyphBarWidthis the width of the icon column on the left, whileBorderWidthandBorderOffsetadjust the menu border.
Example
From the demo MlSkin.Demo.QQ旋风.v3.0 (.dfm form file)
object mn1: TMlSkinMenu
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
HotFont.Charset = DEFAULT_CHARSET
HotFont.Color = clWhite
HotFont.Height = -11
HotFont.Name = 'Tahoma'
HotFont.Style = []
Menu_bk = 'MlSkinMenu_bk'
Menu_hilight = 'MlSkinMenu_hilight'
Menu_Check = 'MlSkinMenu_icon_check'
Menu_Radio = 'MlSkinMenu_icon_radio'
Menu_SubArrow = 'MlSkinMenu_sub_arrow'
Left = 288
Top = 129
end
Properties 12
| Name | Type | Default | Description |
|---|---|---|---|
About | TMlAboutInfo | — | A design-time property: double-clicking it in the Object Inspector opens the MLSkin about box with the component version. It has no effect at run time and is not stored in the .dfm. |
Font | TFont | — | Font of the menu text. |
HotFont | TFont | — | Font used while the mouse is over the control, typically a different color or an underline for the hover effect. |
LineColor | TColor | $00C4C4C4 | Colour of the menu separator lines. |
Menu_bk | TMlResID | — | Menu background image. |
Menu_hilight | TMlResID | — | Highlight bar image drawn under the selected menu item. |
Menu_Check | TMlResID | — | Image for the check mark on a menu item. |
Menu_Radio | TMlResID | — | Image for the radio mark on a menu item. |
Menu_SubArrow | TMlResID | — | Image for the arrow shown on items that have a submenu. |
BorderOffset | Integer | 6 | Offset of the menu content from its border, in pixels. |
BorderWidth | Integer | 0 | Width of the menu border in pixels. |
GlyphBarWidth | Integer | 31 | Width of the icon column at the left of the menu, where item icons are drawn. |
Only the properties and events MLSkin adds are listed here. Standard VCL properties such as Align, Anchors, Font and OnClick are available too and behave exactly as on the stock controls.
Offline helpA PDF / CHM version is available for offline reading.