GraffitiTabBar

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 #

NameValues
OverflowTypesShadowed
ButtonsEnd
ButtonsStart
ButtonsBoth

Constants #

This class exposes no constants.

Events #

NameParametersReturn TypeDescription
CancelSelectionChangeitem as GraffitiTabBarItemBooleanRaised when the user attempts to select a new tab. Return True to cancel change.
DisallowReorderitem as GraffitiTabBarItem
beforeItem as GraffitiTabBarItem
BooleanRaised during reorder operations. Return True to disallow the reorder operation.
ItemCancelCloseitem as GraffitiTabBarItemBooleanRaised when the user attempts to close a tab. Return True to cancel.
ItemMouseEnteritem as GraffitiTabBarItemNoneRaised when the user’s cursor enters a TabBarItem’s area.
ItemMouseExititem as GraffitiTabBarItemNoneRaised when the user’s cursor exits a TabBarItem’s area.
ItemReordereditem as GraffitiTabBarItem
newIndex as Integer
NoneRaised when the user has drag reordered a TabBarItem.

Methods #

NameParametersReturn TypeDescription
Additem as GraffitiTabBarItemNoneAdds a new TabBarItem.
AddAtindex as Integer
item as GraffitiTabBarItem
NoneAdds a new TabBarItem at the specified index.
IndexOfitem as GraffitiTabBarItemIntegerReturns the index of the specified item.
ItemAtindex as IntegerGraffitiTabBarItemReturns the item at the specified index.
LastIndexNoneIntegerReturns the last index of the items array.
Removeitem as GraffitiTabBarItemNoneRemoves the specified item.
RemoveAllNoneNoneRemoves all items from the component.
RemoveAtindex as IntegerNoneRemoves the item at the specified index.
ScrollToitem as GraffitiTabBarItemNoneScrolls the display to show the specified item.

Properties #

NameTypeDefault ValueDescription
AllowDragReorderingBooleanFalseControls whether users may drag items to reorder them.
AllowKeyboardNavigationBooleanTrueDetermines whether users can change the currently selected item by using their keyboard’s arrow keys.
AllowMouseWheelScrollingBooleanTrueDetermines whether the control responds to the mouse wheel.
HoverItemGraffitiTabBarItemNilThe currently hovered item.
InitialValueString“”Comma separated list of items to add by default from the IDE’s inspector.
OverflowTypeGraffitiTabBar.OverflowTypesGraffitiTabBar.OverflowTypes.ShadowedDetermines how the display signals users that there are more items than are currently visible.
RendererGraffitiTabBarRendererAuto-generated instanceCustom renderer object used for drawing all aspects of the control.
SelectedIndexInteger-1Currently selected item’s index.
SelectedItemGraffitiTabBarItemNilCurrently selected item.
StyleGraffitiTabBarStyleNilStyle object from which the GraffitiTabBarRenderer should draw its properties. If implementing a custom renderer, this may not be needed.