Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

NSTableViewRowActionMBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Cocoa Controls MBS CocoaControls Plugin 17.1 Yes No No Yes, macOS only No
Function: An NSTableViewRowAction object defines a single action to present when the user swipes horizontally on a table row.
In an editable table, performing a horizontal swipe on a row reveals a button to delete the row by default. This class lets you define one or more custom actions to display for a given row in your table. Each instance of this class represents a single action to perform and includes the text, formatting information, and behavior for the corresponding button.

To add custom actions to your table view’s rows, implement the rowActionsForRow event in your table view’s delegate object. In that method, create and return an array of actions for the specified row. The table handles the remaining work of displaying the action buttons and executing the appropriate handler block when the user clicks the button.

Feedback, Comments & Corrections


Constant Value Description
NSTableViewRowActionStyleDestructive 1 Apply a style that indicates that the action might change or delete data. This style changes the value of the backgroundColor property to an appropriate value to reflect the destructive action. After creating the action object, you can change the background color as needed. Destructive actions require a longer swipe to activate, and trigger an animation when a table row is deleted.
NSTableViewRowActionStyleRegular 0 Apply the default style to the button. This style does not apply any special coloring to the button.

This class has no sub classes.

Some events for this class:

The items on this page are in the following plugins: MBS CocoaControls Plugin.

NSTableViewMBS   -   NSTabViewItemMBS

MBS Xojo PDF Plugins