GraffitiNote

View Categories

Images #

About #

GraffitiNote is a simple yet effective class used to display information via the user interface that should draw a user’s attention. With four different pre-built note types ranging from “Information” to “Error”, and a custom type where custom colors can be applied by the developer, GraffitiNote is very versatile.

The class also supports variable height based on content, and compact or extended modes.

Enumerations #

NameValues
NoteStylesBarLeft
BarRight
BarTop
BarBottom
NoBar
NoteTypesInformation
Success
Warning
Error
Custom
System

Constants #

This class exposes no constants.

Events #

NameParametersReturn TypeDescription
ClosePressedNoneNoneRaised when the note’s close button has been pressed by the user.
HeightChangedNoneNoneIf the AutoHeight property is set to true, this event will fire when the height has changed to fit the contents.
PressedNoneNoneRaised when the note has been pressed by the user.

Methods #

NameParametersReturn TypeDescription
ConstructorNoneNoneCreates a new instance of the control.
Constructorcontainer as DesktopContainerNoneCreates a new instance of the control.
Constructortitle as String, content as StringNoneCreates a new instance of the control.

Properties #

NameTypeDefault ValueDescription
AutoHeightBooleanFalseIf True, the control will resize to fit the contents.
BackgroundColorColorGroupNilColor used to draw the background when Type is set to NoteTypes.Custom
BarColorColorGroupNilColor used to draw the decorative bar when Type is set to NoteTypes.Custom
BarSizeInteger10Size of the decorative bar when Style other than NoteStyles.NoBar
BorderRadiusInteger10Radius of control corners.
BorderSizeInteger1Size of the border drawn around the outter edge of the control, color is taken from BarColor.
ButtonFontBoldBooleanFalseDetermines the font weight of the text drawn within the button.
ButtonFontItalicBooleanFalseDetermines the obliqueness of the text drawn within the button.
ButtonFontNameString“System”Determines which font face to use when drawing the button’s text.
ButtonFontSizeInteger0Determines the size of the font used to draw the button’s text.
ButtonFontUnderlineBooleanFalseDetermines whether the button’s text is drawn underlined.
ButtonTextString“”Caption of the button.
CloseButtonBooleanFalseIf True, will show a close button in the display which animates resizing the height to 0.
CloseSizeInteger14Size, in points, of the close button icon.
CompactBooleanTrueIf False, the title will be positioned on its own line with the content below.
ContentString“”The content of the note.
ContentContainerDesktopContainerNilContainer that is embedded within the note. Overrides Title, Content, and Icon drawing.
ContentBoldBooleanFalseThe weight of the font used for the Content.
ContentFontString“System”The font used in drawing the Content.
ContentItalicBooleanFalseIf True, the content will be drawn italicized.
ContentSizeInteger0Size applied to the font for drawing Content.
ContentUnderlineBooleanFalseIf True, the content will have an underline.
IconPictureNilIcon drawn to the far left of the note.
IconSizeInteger16Size to draw the icon.
LinkColorColorGroupNilColor to use for drawing links. Uses system colors when Nil.
LinkColorHoverColorGroupNilColor used for drawing hovered links. Uses system colors when Nil.
MarginInteger10Outside margin used for drawing Title and Content. If Compact = False, then the left margin of content = Margin*2
MaxHeightInteger10000Sets a maximum height for the control to display. Added to fix a crash when the height of the component would exceed acceptable limits.
StyleNoteStylesNoteStyles.BarLeftPosition of the decorative bar in the display.
TitleString“Untitled”Title of the note.
TitleBoldBooleanTrueFont weight of Title.
TitleColorColorGroupNilColor applied to Title when Type = NoteTypes.Custom.
TitleFontString“System”Font applied to Title
TitleItalicBooleanFalseIf true, Title will be drawn italicized.
TitleSizeInteger0Font size of Title.
TitleUnderlineBooleanFalseIf true, Title will be underlined.
TypeNoteTypesNoteTypes.InformationThe drawing style of the note.

Examples #

Embedded Links #

Links may be embedded within the Message when Compact = False using <link>Link Text</link> tags.