XUIDotLabel
Inherits DesktopCanvas
Description
A simple UI control that draws a customisable dot (rounded circle). Useful for representing state (e.g. a red dot if something is disconnected or a green dot if something is active).
Supports an optional caption.
Properties
Name | Type | Read-Only |
---|---|---|
Caption | String |
|
CaptionColor | ColorGroup |
|
CondenseCaption | Boolean |
|
DotBorderColor | ColorGroup |
|
DotColor | ColorGroup |
|
DotDiameter | Double |
|
DotHasBorder | Boolean |
|
DotPadding | Integer |
|
FontName | String |
|
FontSize | Integer |
|
mCaption | String |
|
mCaptionColor | ColorGroup |
|
mCondenseCaption | Boolean |
|
mDisabledCaptionColor | ColorGroup |
|
mDisabledDotColor | ColorGroup |
|
mDotBorderColor | ColorGroup |
|
mDotColor | ColorGroup |
|
mDotDiameter | Double |
|
mDotHasBorder | Boolean |
|
mDotPadding | Integer |
|
mFontName | String |
|
mFontSize | Integer |
Methods
Name | Parameters | Returns |
---|---|---|
Constructor | ||
DotRadius | Double |
|
DrawCaption | g As Graphics , x As Double |
|
DrawDot | g As Graphics , x As Double |
Double |
Constants
Name | Type |
---|---|
DISABLED_COLOR_CAPTION_DARK | Color |
DISABLED_COLOR_CAPTION_LIGHT | Color |
DISABLED_COLOR_DOT_DARK | Color |
DISABLED_COLOR_DOT_LIGHT | Color |
MIN_CAPTION_FONT_SIZE | Double |
MIN_DOT_DIAMETER | Double |
DISABLED_COLOR_CAPTION_DARK As Color The dark mode colour to use for the caption when the control is disabled.
DISABLED_COLOR_CAPTION_LIGHT As Color The light mode colour to use for the caption when the control is disabled.
DISABLED_COLOR_DOT_DARK As Color The dark mode colour to use for the dot when the control is disabled.
DISABLED_COLOR_DOT_LIGHT As Color The light mode colour to use for the dot when the control is disabled.
MIN_CAPTION_FONT_SIZE As Double The minimum permitted font size for the caption.
MIN_DOT_DIAMETER As Double The minimum permitted diameter of the dot.
Property Descriptions
Caption As String
Optional caption to display beside the dot.
CaptionColor As ColorGroup
The colour to use for the optional caption.
CondenseCaption As Boolean
If True then the caption will be condensed with an ellipsis if it is too long to fit in the available space.
DotBorderColor As ColorGroup
The colour of the dot's border (if enabled).
DotColor As ColorGroup
The colour of the dot.
DotDiameter As Double
The diameter of the dot in pixels.
DotHasBorder As Boolean
True if the dot has a border.
DotPadding As Integer
The number of pixels between the dot and optional caption.
FontName As String
The font to use for the caption.
FontSize As Integer
The font size to use for the caption.
mCaption As String
Optional caption to display beside the dot.
mCaptionColor As ColorGroup
The colour to use for the optional caption.
mCondenseCaption As Boolean
If True then the caption will be condensed with an ellipsis if it is too long to fit in the available space.
mDisabledCaptionColor As ColorGroup
The colour to use for the caption when the control is disabled.
mDisabledDotColor As ColorGroup
The colour to use for the dot when the control is disabled.
mDotBorderColor As ColorGroup
The colour of the dot's border (if enabled).
mDotColor As ColorGroup
The colour of the dot.
mDotDiameter As Double
The diameter of the dot in pixels.
mDotHasBorder As Boolean
True if the dot has a border.
mDotPadding As Integer
The number of pixels between the dot and optional caption.
mFontName As String
The font to use for the caption.
mFontSize As Integer
The font size to use for the caption.
Method Descriptions
Constructor()
The default constructor.
DotRadius() As Double
Returns the current dot radius.
DrawCaption(g As Graphics, x As Double)
Draws the caption to g
starting at x
.
DrawDot(g As Graphics, x As Double) As Double
Draws the dot to g
starting at x
. Returns the X coordinate after the dot, including padding.