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 #
Name | Values |
---|---|
NoteStyles | BarLeft BarRight BarTop BarBottom NoBar |
NoteTypes | Information Success Warning Error Custom System |
Constants #
This class exposes no constants.
Events #
Name | Parameters | Return Type | Description |
---|---|---|---|
ClosePressed | None | None | Raised when the note’s close button has been pressed by the user. |
HeightChanged | None | None | If the AutoHeight property is set to true, this event will fire when the height has changed to fit the contents. |
Pressed | None | None | Raised when the note has been pressed by the user. |
Methods #
Name | Parameters | Return Type | Description |
---|---|---|---|
Constructor | None | None | Creates a new instance of the control. |
Constructor | container as DesktopContainer | None | Creates a new instance of the control. |
Constructor | title as String, content as String | None | Creates a new instance of the control. |
Properties #
Name | Type | Default Value | Description |
---|---|---|---|
AutoHeight | Boolean | False | If True, the control will resize to fit the contents. |
BackgroundColor | ColorGroup | Nil | Color used to draw the background when Type is set to NoteTypes.Custom |
BarColor | ColorGroup | Nil | Color used to draw the decorative bar when Type is set to NoteTypes.Custom |
BarSize | Integer | 10 | Size of the decorative bar when Style other than NoteStyles.NoBar |
BorderRadius | Integer | 10 | Radius of control corners. |
BorderSize | Integer | 1 | Size of the border drawn around the outter edge of the control, color is taken from BarColor. |
ButtonFontBold | Boolean | False | Determines the font weight of the text drawn within the button. |
ButtonFontItalic | Boolean | False | Determines the obliqueness of the text drawn within the button. |
ButtonFontName | String | “System” | Determines which font face to use when drawing the button’s text. |
ButtonFontSize | Integer | 0 | Determines the size of the font used to draw the button’s text. |
ButtonFontUnderline | Boolean | False | Determines whether the button’s text is drawn underlined. |
ButtonText | String | “” | Caption of the button. |
CloseButton | Boolean | False | If True, will show a close button in the display which animates resizing the height to 0. |
CloseSize | Integer | 14 | Size, in points, of the close button icon. |
Compact | Boolean | True | If False, the title will be positioned on its own line with the content below. |
Content | String | “” | The content of the note. |
ContentContainer | DesktopContainer | Nil | Container that is embedded within the note. Overrides Title, Content, and Icon drawing. |
ContentBold | Boolean | False | The weight of the font used for the Content. |
ContentFont | String | “System” | The font used in drawing the Content. |
ContentItalic | Boolean | False | If True, the content will be drawn italicized. |
ContentSize | Integer | 0 | Size applied to the font for drawing Content. |
ContentUnderline | Boolean | False | If True, the content will have an underline. |
Icon | Picture | Nil | Icon drawn to the far left of the note. |
IconSize | Integer | 16 | Size to draw the icon. |
LinkColor | ColorGroup | Nil | Color to use for drawing links. Uses system colors when Nil. |
LinkColorHover | ColorGroup | Nil | Color used for drawing hovered links. Uses system colors when Nil. |
Margin | Integer | 10 | Outside margin used for drawing Title and Content. If Compact = False, then the left margin of content = Margin*2 |
MaxHeight | Integer | 10000 | Sets a maximum height for the control to display. Added to fix a crash when the height of the component would exceed acceptable limits. |
Style | NoteStyles | NoteStyles.BarLeft | Position of the decorative bar in the display. |
Title | String | “Untitled” | Title of the note. |
TitleBold | Boolean | True | Font weight of Title. |
TitleColor | ColorGroup | Nil | Color applied to Title when Type = NoteTypes.Custom. |
TitleFont | String | “System” | Font applied to Title |
TitleItalic | Boolean | False | If true, Title will be drawn italicized. |
TitleSize | Integer | 0 | Font size of Title. |
TitleUnderline | Boolean | False | If true, Title will be underlined. |
Type | NoteTypes | NoteTypes.Information | The drawing style of the note. |
Examples #
Embedded Links #
Links may be embedded within the Message when Compact = False using <link>Link Text</link>
tags.