Platforms to show: All Mac Windows Linux Cross-Platform

NSTableViewMBS class

Super class: NSViewMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Cocoa Controls MBS MacControls Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
An NSTableView object displays record-oriented data in a table and allows the user to edit values and resize and rearrange columns.

You can embed this view in a CustomNSViewMBS to get more events for mouse and keyboard.
Subclass of the NSViewMBS class.

Constants

Constant Value Description
NSTableViewDashedHorizontalGridLineMask 8 One of the constants to specify grid styles. Specifies that the horizontal grid lines should be drawn dashed.
NSTableViewDraggingDestinationFeedbackStyleGap 2 One of the dragging styles. Provides a gap insertion when dragging over the table. Note that this style is only officially supported for View Based TableViews, but may partially work in Cell Based TableViews. The decision to use the gap style (compared to another style) can be made in draggingSessionWillBeginAtPoint, or it can dynamically be changed.
NSTableViewDraggingDestinationFeedbackStyleNone -1 One of the constants to specify the drag styles displayed by the table view. Provides no feedback when the user drags over the table view. This option exists to allow subclasses to implement their dragging destination highlighting, or to make it not show anything all. more
NSTableViewDraggingDestinationFeedbackStyleRegular 0 One of the constants to specify the drag styles displayed by the table view. Draws a solid round-rect background on drop target rows, and an insertion marker between rows. This style should be used in most cases.

Available in Mac OS X v10.6 and later.
NSTableViewDraggingDestinationFeedbackStyleSourceList 1 One of the constants to specify the drag styles displayed by the table view. Draws an outline on drop target rows, and an insertion marker between rows. This style will automatically be set for source lists when the table's setSelectionHighlightStyle: is set to NSTableViewSelectionHighlightStyleSourceList. This is the standard look for Source Lists, but may be used in other areas as needed. more
NSTableViewDropAbove 1 One of the constants to specify drop operations. Specifies that the drop should occur above the specified row. more
NSTableViewDropOn 0 One of the constants to specify drop operations. Specifies that the drop should occur on the specified row. more
NSTableViewFirstColumnOnlyAutoresizingStyle 5 One of the constants to specify the autoresizing style. Autoresize only the first table column. more
NSTableViewGridNone 0 One of the constants for the grid styles. Specifies that no grid lines should be displayed.
NSTableViewLastColumnOnlyAutoresizingStyle 4 One of the constants to specify the autoresizing style. Autoresize only the last table column. more
NSTableViewNoColumnAutoresizing 0 One of the constants to specify the autoresizing style. Disable table column autoresizing.
Available in Mac OS X v10.4 and later.
NSTableViewReverseSequentialColumnAutoresizingStyle 3 One of the constants to specify the autoresizing style. Autoresize each table column sequentially, from the first auto-resizable column to the last auto-resizable column; proceed to the next column when the current column has reached its minimum or maximum size. more
NSTableViewSelectionHighlightStyleNone -1 One of the constants to specify the selection highlight styles. Displays no highlight style at all.
Available in Mac OS X v10.6 and later.
NSTableViewSelectionHighlightStyleRegular 0 One of the constants for the selectionHighlightStyle property. The regular highlight style of NSTableView. On Mac OS X v10.5 a light blue (returned by sending NSColor a alternateSelectedControlColor message) or light gray color (returned by sending NSColor a secondarySelectedControlColor message). more
NSTableViewSelectionHighlightStyleSourceList 1 One of the constants for the selectionHighlightStyle property. The source list style of NSTableView. On 10.5, a light blue gradient is used to highlight selected rows. more
NSTableViewSequentialColumnAutoresizingStyle 2 One of the constants to specify the autoresizing style. Autoresize each table column sequentially, from the last auto-resizable column to the first auto-resizable column; proceed to the next column when the current column has reached its minimum or maximum size. more
NSTableViewSolidHorizontalGridLineMask 2 One of the constants to specify grid styles. Specifies that horizontal grid lines should be displayed. more
NSTableViewSolidVerticalGridLineMask 1 One of the constants to specify grid styles. Specifies that vertical grid lines should be displayed. more
NSTableViewUniformColumnAutoresizingStyle 1 One of the constants to specify the autoresizing style. Autoresize all columns by distributing space equally, simultaneously.
Available in Mac OS X v10.4 and later.

RowActionEdge

Constant Value Description
NSTableRowActionEdgeLeading 0 Denotes the leading, or left, edge of an table row view.
NSTableRowActionEdgeTrailing 1 Denotes the trailing, or right, edge of an table row view.

Animation options

Constant Value Description
NSTableViewAnimationEffectFade 1 Use a fade for row or column removal. The effect can be combined with any of the slide constants.
NSTableViewAnimationEffectGap 2 Creates a gap for newly inserted rows. This is useful for drag and drop animations that animate to a newly opened gap and should be used in the acceptDrop event.
NSTableViewAnimationEffectNone 0 Use no animation effects.
NSTableViewAnimationSlideDown &h20 Animates a row insertion or removal by sliding downward.
NSTableViewAnimationSlideLeft &h30 Animates a row insertion by sliding from the left. Animates a row removal by sliding towards the left.
NSTableViewAnimationSlideRight &h40 Animates a row insertion by sliding from the right. Animates a row removal by sliding towards the right.
NSTableViewAnimationSlideUp &h10 Animates a row insertion or removal by sliding upward.

Row Size Style Constants

Constant Value Description
NSTableViewRowSizeStyleCustom 0 The table will use the rowHeight or invoke the delegate method tableView:heightOfRow:, if implemented. The cell layout is not changed. more
NSTableViewRowSizeStyleDefault -1 The table will use the system default layout size: small, medium or large. more
NSTableViewRowSizeStyleLarge 3 The table will use a row height specified for a small table. It is required that the size be fully tested and supported if NSTableViewRowSizeStyleCustom is not used. more
NSTableViewRowSizeStyleMedium 2 The table will use a row height specified for a medium table. It is required that the size be fully tested and supported if NSTableViewRowSizeStyleCustom is not used. more
NSTableViewRowSizeStyleSmall 1 The table will use a row height specified for a small table. It is required that the size be fully tested and supported if NSTableViewRowSizeStyleCustom is not used. more

Styles

Constant Value Description
NSTableViewStyleAutomatic 0 Automatically infers the effectiveStyle from the table view hierarchy.
NSTableViewStyleFullWidth 1 Edge-to-edge style with standard content padding at the ends of each row. This content padding is constant and independent of intercellSpacing.
NSTableViewStyleInset 2 Inset style with rounded corners selection
NSTableViewStylePlain 4 A plain style. No insets, padding or any other kind of decoration applied to the row or its background. The cells are equally spaced in the row using intercellSpacing.width.
NSTableViewStyleSourceList 3 The source list style of NSTableView. Setting this style will have the side effect of setting the background color to "source list". more

Super class NSViewMBS

Constants

Constant Value Description
NSBezelBorder 2 One of the constants to specify the type of a view's border. A concave border that makes the view look sunken.
NSFocusRingTypeDefault 0 One of the constants for the focusringtype property. The default focus ring type for NSView or NSCell.
NSFocusRingTypeExterior 2 One of the constants for the focusringtype property. The standard Aqua focus ring.
NSFocusRingTypeNone 1 One of the constants for the focusringtype property. No focus ring. If you set the focus ring type to this value, NSView and NSCell will not draw any focus ring.
NSGrooveBorder 3 One of the constants to specify the type of a view's border. A thin border that looks etched around the image.
NSLineBorder 1 One of the constants to specify the type of a view's border. A black line border around the view.
NSNoBorder 0 One of the constants to specify the type of a view's border. No border.
NSViewHeightSizable 16 One of the constants for the autoresizingMask property. The receiver's height is flexible.
NSViewLayerContentsRedrawBeforeViewResize 3 One of the view layer content redraw policy constants.
NSViewLayerContentsRedrawDuringViewResize 2 One of the view layer content redraw policy constants.
NSViewLayerContentsRedrawNever 0 One of the view layer content redraw policy constants.
NSViewLayerContentsRedrawOnSetNeedsDisplay 1 One of the view layer content redraw policy constants.
NSViewMaxXMargin 4 One of the constants for the autoresizingMask property. The right margin between the receiver and its superview is flexible.
NSViewMaxYMargin 32 One of the constants for the autoresizingMask property. The top margin between the receiver and its superview is flexible.
NSViewMinXMargin 1 One of the constants for the autoresizingMask property. The left margin between the receiver and its superview is flexible.
NSViewMinYMargin 8 One of the constants for the autoresizingMask property. The bottom margin between the receiver and its superview is flexible.
NSViewNotSizable 0 One of the constants for the autoresizingMask property. The receiver cannot be resized.
NSViewWidthSizable 2 One of the constants for the autoresizingMask property. The receiver's width is flexible.

Window Order Constants

Constant Value Description
NSWindowAbove 1 Moves the window above the indicated window.
NSWindowBelow -1 Moves the window below the indicated window.
NSWindowOut 0 Moves the window off the screen.

Super class NSResponderMBS

Sub classes:

Some properties using for this class:

Some examples using this class:

Blog Entries

Xojo Developer Magazine

Release notes


The items on this page are in the following plugins: MBS MacBase Plugin, MBS MacControls Plugin.


NSTableRowViewMBS   -   NSTableViewRowActionMBS


The biggest plugin in space...