GraffitiBadge

View Categories

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 #

DefinitionParametersReturn TypeDescription
DoublePressedNoneNoneRaised when the badge is double-clicked or double-pressed.
PressedNoneNoneRaised when the badge is clicked or pressed via touch.

Methods #

This class exposes no methods.

Properties #

NameTypeDefault ValueDescription
BackgroundColorColorGroupNilColor set applied to the badge’s background.
BoldBooleanFalseDetermines the weight of the font used.
BorderRadiusInteger8Corner radius. Value is overridden if IsPill = True.
IsButtonBooleanFalseWhen True, the badge will respond visually to mouse actions.
IsPillBooleanFalseWhen True, the badge displays with more rounded corners.
ItalicBooleanFalseDetermines the obliqueness of the text.
TextStringUntitledText to display within the badge.
TextColorColorGroupNilColor set applied to the badge’s foreground.
TextFontStringSystemFont face used for text display.
TextFontSizeInteger-1Font size used for display. Automatically calculated to fill the badge if value = -1.
TextPaddingInteger0Additional padding added when TextFontSize = -1.
UnderlineBooleanFalseWhen 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.