TMlURLButton

A hyperlink-style button: it looks like a web link and runs an action when clicked.

Category
Buttons & toolbars
Unit
uMlSkinButton.pas
Inherits from
TMlSkinLabelTMlSkinCustomLabelTMlSkinCustomPanelTMlSkinCustomControl

Notes

  • Font is the normal state and FontHot takes over on hover, typically with an underline and a color change for the link effect.

Example

From the demo MlSkin.Demo.360云盘.v3.0 (.dfm form file)

object btn1: TMlURLButton
  Left = 10
  Top = 556
  Width = 166
  Height = 14
  Cursor = crHandPoint
  AutoInvalidate = True
  Alpha = 0
  Anchors = [akLeft, akRight]
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -12
  Font.Name = 'Tahoma'
  Font.Style = []
  ParentFont = False
  FontHot.Charset = DEFAULT_CHARSET
  FontHot.Color = 16365879
  FontHot.Height = -12
  FontHot.Name = 'Tahoma'
  FontHot.Style = []

Properties 1

NameTypeDefaultDescription
FontHotTFontFont used while the mouse is over the control.
Properties of TMlSkinLabel 10
NameTypeDefaultDescription
AlphaByte192Opacity: 0 fully transparent, 255 opaque.
EllipsisPositionTEllipsisPositionepNoneWhere the ellipsis goes when text is too long: epEndEllipsis at the end, epPathEllipsis in the middle (good for paths), epWordEllipsis at a word boundary, epNone none.
AlignmentHorizontalTAlignmenttaLeftJustifyHorizontal text alignment: left, centred or right.
AlignmentVerticalTVerticalAlignmenttaAlignTopVertical text alignment: top, centred or bottom.
AutoSizeBooleanTrueWhether the control resizes itself to fit its content.
RoundBackgroundBooleanFalseDraws the background with rounded corners; combined with Color it gives a tag-style text block.
RoundSizeInteger5Corner radius in pixels; 0 means square corners.
LightTMlLightClassGlow effect: switch, glow color and blur radius.
WordWapBooleanFalseWhether long text wraps to the next line.
ColorTColorclWhiteBackground color of the control; ignored while Transparent is on.
Properties of TMlSkinCustomPanel 1
NameTypeDefaultDescription
ColorTColorclWhiteBackground color of the control; ignored while Transparent is on.
Events of TMlSkinCustomPanel 1
NameTypeDefaultDescription
OnCustomDrawTMlCustomDrawEventCustom draw event: paint your own content after the control has drawn itself.
Properties of TMlSkinCustomControl 5
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.
ColorTColorclWhiteBackground color of the control; ignored while Transparent is on.
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.