GraffitiSegButton

Images #

About #

GraffitiSegButton is a powerful segmented button component that can double as a BevelButton, toolbar replacement, and much more!

Features:

  • Immersive coloring for Windows and macOS
  • AutoWidth and AutoCollapse
  • Icons + Text with alignment
  • Attached popup menus
  • None, Single, or Multiple selection modes
  • Per-button focus rects

Enumerations #

Name Values
Alignments Left
Right
SelectionTypes Single
Multiple
None

Constants #

Name Type Value

This class exposes no constants.

Events #

Definition Parameters Description
ItemClicked item as GraffitiSegButtonItem Fires when the user has clicked an item in the display.
ItemMenuClicked item as GraffitiSegButtonItem Raised when the user clicks selects a menu item from an item’s menu.
m as MenuItem
MouseOverItem item as GraffitiSegButtonItem Raised when the user moves their cursor over an item.
WidthChanged None Fired when the width of the control has changed. Only applicable when AutoWidth = True.

Methods #

Definition Parameters Return Type Description
AddItem item as GraffitiSegButtonItem None Adds the specified item to the component.
AddItem itemText as String None Creates and adds an item to the component with itemText as the caption.
InsertItem atIndex as Integer None Inserts the specified item at the given index.
item as GraffitiSegButtonItem
Item index as Integer GraffitiSegButtonItem Returns the item at the given index.
ItemCount None Integer Returns the number of items in the component. This equates to last item index + 1.
RemoveAll None None Removes all items from the component.
RemoveItem Index as Integer None Removes the item at the specified index.

Properties #

Name Type Default Value Description
AutoWidth Boolean False When True, the component will resize in an attempt to fit all items comfortably.
When False, items will collapse out of view and a disclosure button will be shown.
Bold Boolean False When True, items will default to Bold text.
IconAlignment Alignments Alignments.Left Position of the icon relative to the text for items.
InitialValue String None A tab-delimited string of buttons to add by default.
Italic Boolean False When True, items will default to displaying text italicized.
SelectionType SelectionTypes SelectionTypes.Single Selection behavior when the user clicks on an item.
TextFont String System Font face used to draw item text.
TextSize Integer 0 Font size used to draw item text.
Underline Boolean False When True, item text will be drawn underlined.

Examples #

This class currently has no examples.

Notes #

This class currently has no notes.