Images #
About #
GraffitiBadge is a simple yet powerful addition to your UI toolkit. Display responsively-size badges anywhere and everywhere without worrying about font sizes.
Features:
- Automatic text sizing
- Custom background color
- Custom text color
- ColorGroup support
- Button functionality
- Pill display mode
Enumerations #
This class exposes no enumerations.
Constants #
This class exposes no constants.
Events #
Definition | Parameters | Return Type | Description |
---|---|---|---|
DoublePressed | None | None | Raised when the badge is double-clicked or double-pressed. |
Pressed | None | None | Raised when the badge is clicked or pressed via touch. |
Methods #
This class exposes no methods.
Properties #
Name | Type | Default Value | Description |
---|---|---|---|
BackgroundColor | ColorGroup | Nil | Color set applied to the badge’s background. |
Bold | Boolean | False | Determines the weight of the font used. |
BorderRadius | Integer | 8 | Corner radius. Value is overridden if IsPill = True. |
IsButton | Boolean | False | When True, the badge will respond visually to mouse actions. |
IsPill | Boolean | False | When True, the badge displays with more rounded corners. |
Italic | Boolean | False | Determines the obliqueness of the text. |
Text | String | Untitled | Text to display within the badge. |
TextColor | ColorGroup | Nil | Color set applied to the badge’s foreground. |
TextFont | String | System | Font face used for text display. |
TextFontSize | Integer | -1 | Font size used for display. Automatically calculated to fill the badge if value = -1. |
TextPadding | Integer | 0 | Additional padding added when TextFontSize = -1. |
Underline | Boolean | False | When True, the text will be displayed with the underline decoration. |
Examples #
This class currently has no examples.
Notes #
Windows Transparency #
Like all custom controls on Windows, drawing may be restricted by Xojo’s lack of true transparency. On Windows, if overlapping GraffitiBadge on another control, it is advised to set BorderRadius to 0.