TMlSkinExpandBox

A collapsible panel: clicking the header expands or collapses the content, which suits grouped settings pages.

Category
Lists & combo boxes
Unit
uMlSkinExpandBox.pas
Inherits from
TMlSkinCustomControl

Notes

  • Expand reads and writes the state and fires OnChanged; turning AllowCollapse off keeps it permanently open.
  • Title is the header text, TitleIcon its icon and TitleHeight its height.
  • ExpandIcon and CollapseIcon are the indicators for the two states.

Properties 11

NameTypeDefaultDescription
AllowCollapseBooleanTrueWhether the panel may be collapsed; with it off the panel stays open.
TitleHeightIntegerHeight of the header in pixels.
TitleIconTMlResIDIcon at the left of the header.
TitleFontTFontFont of the header text.
TitleColorTColor$00AACF58Background colour of the header.
ExpandIconTMlResIDIndicator icon shown while the panel is expanded.
CollapseIconTMlResIDIndicator icon shown while the panel is collapsed.
TitlestringThe header text.
ExpandBooleanTrueWhether the panel is expanded; changing it fires OnChanged.
BorderColorTColor$0062404BBorder color.
ColorTColorclWhiteBackground color of the control; ignored while Transparent is on.

Events 1

NameTypeDefaultDescription
OnChangedTNotifyEventFires after the state or value has changed.
Properties of TMlSkinCustomControl 4
NameTypeDefaultDescription
AboutTMlAboutInfoA 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.
TransparentBooleanTrueTransparent background: the control skips its own fill and shows the form background (image or color) instead.
AutoInvalidateBooleanFalseRepaints automatically when the content changes. Turn it on if property changes do not show up.
EraseBackgroundBooleanFalseWhether the background is erased before painting; worth toggling if the control flickers.
Events of TMlSkinCustomControl 4
NameTypeDefaultDescription
OnDPIChangedTMlDPIChangedEventFires when the screen DPI changes, for example when the window moves to a monitor with a different scaling — a good place to re-adjust anything you draw yourself.
OnBackgroundChangingTMlBackgroundEventFires just before the background changes, giving you a chance to adjust what is drawn.
OnBackgroundChangedTMlCustomDrawEventFires after the background has been drawn, so you can paint on top of it.
OnVisibleChangedTNotifyEventFires when the control is shown or hidden.

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.