TMlSkinPageControl
The skinned page control: multiple tab pages whose images, captions and layout are all customizable.
Notes
- Each tab state has its own image:
TabNormalPicture,TabHotPictureon hover andTabDownPicturewhen selected. TabWidthAutoSizesizes tabs to their captions;TextInHorizontalkeeps the text horizontal on vertically stacked tabs.- The active tab can use its own font (
FontActive), andCaptionLightadds a glow to the caption. OnMlTabChangingfires before the page changes, so you can block the switch — when the current page has unsaved data, for instance.- Use
OnMlDrawTabto draw the tabs entirely yourself.
Example
From the demo MlSkin.Demo.360安全卫士.v3.1 (.dfm form file)
object mlsknpgcntrl1: TMlSkinPageControl
Left = 0
Top = 0
Width = 869
Height = 477
ActivePage = mlskntbsht1
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWhite
Font.Height = -12
Font.Name = 'Tahoma'
Font.Style = []
MultiLine = True
ParentFont = False
TabHeight = 82
TabOrder = 1
TabWidth = 74
CaptionLight.Active = False
TabImageOffset.X = 12
TabImageOffset.Y = 5
Properties 14
| 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. |
CaptionLight | TMlLightClass | — | Glow for the tab captions: switch, color and blur radius. |
Transparent | Boolean | True | Transparent background: the control skips its own fill and shows the form background (image or color) instead. |
TabImageOffset | TMlBtnItemOffset | — | Offset (X, Y) of the icon on a tab. |
TabCaptionOffset | TMlBtnItemOffset | — | Offset (X, Y) of the caption on a tab. |
TabsOffset | TMlBtnItemOffset | — | Offset (X, Y) of the whole tab strip inside the control. |
TabHotPicture | TMlResID | — | Tab background image used on hover. |
TabDownPicture | TMlResID | — | Tab background image for the selected tab. |
TabNormalPicture | TMlResID | — | Tab background image in the normal state. |
DefaultItemHeight | Integer | 26 | Default tab height in pixels. |
TextInHorizontal | Boolean | — | Keeps tab captions horizontal even when the tabs are stacked vertically. |
TabWidthAutoSize | Boolean | False | Whether tab width follows the caption length. |
FontActive | TFont | — | Font used by the caption of the selected tab. |
FontHot | TFont | — | Font used while the mouse is over the control. |
Events 2
| Name | Type | Default | Description |
|---|---|---|---|
OnMlTabChanging | TMlTabChangingEvent | — | Fires before the page changes so you can block the switch, for example when the current page has unsaved data. |
OnMlDrawTab | TMlDrawTabEvent | — | Fires while a tab is drawn, giving full control over its appearance. |
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.