Table of Contents
Preview #
About #
GraffitiTabBar is a powerful and customizable tab bar implementation.
Features:
- Styling via custom object of properties to apply
- Custom renderers built using subclasses
- Default, Hover, and Pressed states
- Multiple Overflow types built-in
- Drag reordering
- Keyboard navigation
- Mouse wheel scrolling
Enumerations #
Name | Values |
---|---|
OverflowTypes | Shadowed ButtonsEnd ButtonsStart ButtonsBoth |
Constants #
This class exposes no constants.
Events #
Name | Parameters | Return Type | Description |
---|---|---|---|
CancelSelectionChange | item as GraffitiTabBarItem | Boolean | Raised when the user attempts to select a new tab. Return True to cancel change. |
DisallowReorder | item as GraffitiTabBarItem beforeItem as GraffitiTabBarItem | Boolean | Raised during reorder operations. Return True to disallow the reorder operation. |
ItemCancelClose | item as GraffitiTabBarItem | Boolean | Raised when the user attempts to close a tab. Return True to cancel. |
ItemMouseEnter | item as GraffitiTabBarItem | None | Raised when the user’s cursor enters a TabBarItem’s area. |
ItemMouseExit | item as GraffitiTabBarItem | None | Raised when the user’s cursor exits a TabBarItem’s area. |
ItemReordered | item as GraffitiTabBarItem newIndex as Integer | None | Raised when the user has drag reordered a TabBarItem. |
Methods #
Name | Parameters | Return Type | Description |
---|---|---|---|
Add | item as GraffitiTabBarItem | None | Adds a new TabBarItem. |
AddAt | index as Integer item as GraffitiTabBarItem | None | Adds a new TabBarItem at the specified index. |
IndexOf | item as GraffitiTabBarItem | Integer | Returns the index of the specified item. |
ItemAt | index as Integer | GraffitiTabBarItem | Returns the item at the specified index. |
LastIndex | None | Integer | Returns the last index of the items array. |
Remove | item as GraffitiTabBarItem | None | Removes the specified item. |
RemoveAll | None | None | Removes all items from the component. |
RemoveAt | index as Integer | None | Removes the item at the specified index. |
ScrollTo | item as GraffitiTabBarItem | None | Scrolls the display to show the specified item. |
Properties #
Name | Type | Default Value | Description |
---|---|---|---|
AllowDragReordering | Boolean | False | Controls whether users may drag items to reorder them. |
AllowKeyboardNavigation | Boolean | True | Determines whether users can change the currently selected item by using their keyboard’s arrow keys. |
AllowMouseWheelScrolling | Boolean | True | Determines whether the control responds to the mouse wheel. |
HoverItem | GraffitiTabBarItem | Nil | The currently hovered item. |
InitialValue | String | “” | Comma separated list of items to add by default from the IDE’s inspector. |
OverflowType | GraffitiTabBar.OverflowTypes | GraffitiTabBar.OverflowTypes.Shadowed | Determines how the display signals users that there are more items than are currently visible. |
Renderer | GraffitiTabBarRenderer | Auto-generated instance | Custom renderer object used for drawing all aspects of the control. |
SelectedIndex | Integer | -1 | Currently selected item’s index. |
SelectedItem | GraffitiTabBarItem | Nil | Currently selected item. |
Style | GraffitiTabBarStyle | Nil | Style object from which the GraffitiTabBarRenderer should draw its properties. If implementing a custom renderer, this may not be needed. |