GraffitiPanelSelector

View Categories

Preview #

About #

GraffitiPanelSelector is a control that is designed to provide a mechanism for selecting between a short list of items in an appealing vertical or horizontal display.

Features:

  • Custom color properties for the entire control or individual items
  • Custom drawing events
  • Keyboard-based selection change
  • Custom item width definitions
  • Beautiful animations

Enumerations #

NameValues
OrientationsHorizontal
Vetical
ScrollbarVisibilitiesAuto
Always
Never

Constants #

This class exposes no constants.

Events #

NameParametersReturn TypeDescription
DrawItemDescriptiong as Graphics
item as GraffitiPanelSelectorItem
bounds as Rect
BooleanRaised when an item’s description is being drawn. Return True if you do not wish for the component to draw the default. Modify bounds to reposition.
DrawItemIcong as Graphics
item as GraffitiPanelSelectorItem
bounds as Rect
BooleanRaised when an item’s icon is being drawn. Return True if you do not wish for the component to draw the default. Modify bounds to reposition.
DrawItemTitleg as Graphics
item as GraffitiPanelSelectorItem
bounds as Rect
BooleanRaised when an item’s title is being drawn. Return True if you do not wish for the component to draw the default. Modify bounds to reposition.
DrawSelectionRectg as Graphics
bounds as Rect
BooleanRaised when the selection rect is being drawn. Return True if you do not wish for the component to draw the default. Modify bounds to reposition.
ItemMouseEnteritem as GraffitiPanelSelectorItemNoneRaised when the user’s cursor enters an item’s area.
ItemMouseExititem as GraffitiPanelSelectorItemNoneRaised when the user’s cursor exits an item’s area.
ItemPresseditem as GraffitiPanelSelectorItem
position as Point
BooleanRaised when the user presses an item. Return True to cancel selection change. Position is relative to that item’s Left/Top.
PaintBackgroundg as GraphicsBooleanRaised when the background of the component is being drawn. Return True to cancel default drawing.
PaintItemBackgroundg as graphics
item as GraffitiPanelSelectorItem
BooleanRaised when an item’s background is being drawn. Return True to cancel default drawing.

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.
InvalidateAllNoneNoneCauses the component to destroy all cached images of items and redraw fresh.
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
AllowDragScrollingBooleanFalseControls whether users may scroll the display by dragging.
AnimationEasingGraffitiAnimator.EasingsGraffitiAnimator.Easings.LinearDetermines the animation algorithm used for scroll or selection operations.
AnimationLengthInteger800Determines the length of animations.
BackgroundColorColorGroupNilColors used to draw the background of the component.
BorderColorColorGroupNilColors used to draw the border of the component.
BorderSizeInteger2Point size of the border of the component.
DescriptionColorDefaultColorGroupNilColors used to draw the description text of items when neither hovered or selected.
DescriptionColorHoveredColorGroupNilColors used to draw the description text of items when hovered.
DescriptionColorSelectedColorGroupNilColors used to draw the description text of items when selected.
DescriptionFontFontNilFont used to draw description text.
HasBackgroundBooleanTrueDetermines whether a background should be drawn.
HasBorderBooleanTrueDetermines whether a border should be drawn.
OrientationOrientationsOrientations.HorizontalControls whether the control operates vertically or horizontally.
PaddingInteger0Outside padding applied between component and item edges.
PanelBackgroundColorDefaultColorGroupNilColors used to draw the background of items when neither hovered or selected.
PanelBackgroundColorHoveredColorGroupNilColors used to draw the background of items when hovered.
PanelBackgroundColorSelectedColorGroupNilColors used to draw the background of items when selected.
PanelBorderRadiusInteger14Corner radius applied to items.
PanelBorderSizeInteger0Size of border drawn around items.
PanelPaddingInteger4Padding, in points, used for spacing inside items.
ScrollbarVisibilityScrollbarVisibilitiesScrollbarVisibilities.AutoDetermines the behavior of the scrollbar, when necessary.
ScrollPositionInteger0Current offset of the items within the component’s display.
SelectedItemGraffitiPanelSelectorItemNilThe currently selected item.
SelectionColorColorGroupNilColors used for drawing the selection rect.
TitleColorDefaultColorGroupNilColors used for drawing item titles when neither hovered or selected.
TitleColorHoveredColorGroupNilColors used for drawing item titles when hovered.
TitleColorSelectedColorGroupNilColors used for drawing item titles when selected.
TitleFontFontNilFont used to draw title text.