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
Function: An NSTableView object displays record-oriented data in a table and allows the user to edit values and resize and rearrange columns.
Notes:
You can embed this view in a CustomNSViewMBS to get more events for mouse and keyboard.
Subclass of the NSViewMBS class.

Feedback, Comments & Corrections

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.
Available in OS X v10.7 and later.
The row size style constants define the size of the rows in the table view. They are used by the effectiveRowSizeStyle and rowSizeStyle methods. You can also query the row size in the NSTableCellView class' property rowSizeStyle.
NSTableViewRowSizeStyleDefault -1 The table will use the system default layout size: small, medium or large.
Available in OS X v10.7 and later.
The row size style constants define the size of the rows in the table view. They are used by the effectiveRowSizeStyle and rowSizeStyle methods. You can also query the row size in the NSTableCellView class' property rowSizeStyle.
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.
Available in OS X v10.7 and later.
The row size style constants define the size of the rows in the table view. They are used by the effectiveRowSizeStyle and rowSizeStyle methods. You can also query the row size in the NSTableCellView class' property rowSizeStyle.
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.
Available in OS X v10.7 and later.
The row size style constants define the size of the rows in the table view. They are used by the effectiveRowSizeStyle and rowSizeStyle methods. You can also query the row size in the NSTableCellView class' property rowSizeStyle.
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.
Available in OS X v10.7 and later.
The row size style constants define the size of the rows in the table view. They are used by the effectiveRowSizeStyle and rowSizeStyle methods. You can also query the row size in the NSTableCellView class' property rowSizeStyle.

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".
Additionally in NSOutlineView, the following properties may change to get the standard "source list" look: indentationPerLevel, rowHeight and intercellSpacing. After setting the style it is possible to change any of the other properties as required.
In 10.11, if the background color has been changed from the "source list" background color to something else, the table will no longer draw the selection as a source list blur style, and instead will draw a normal selection highlight.
This replaces NSTableViewSelectionHighlightStyleSourceList which is to be deprecated.

Super class NSViewMBS

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


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


NSTableRowViewMBS   -   NSTableViewRowActionMBS

The biggest plugin in space...




Links
MBS Xojo PDF Plugins

Start Chat