Platforms to show: All Mac Windows Linux Cross-Platform

NSTableColumnMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Cocoa Controls MBS MacControls Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
An NSTableColumn stores the display characteristics and attribute identifier for a column in an NSTableView.
Example
// create a table view with two columns inside a scroll view
Var table As New NSTableViewMBS(0, 0, 400, 300)

Var nameColumn As New NSTableColumnMBS("name")
nameColumn.title = "Name"
nameColumn.width = 250
nameColumn.minWidth = 100
table.addTableColumn nameColumn

Var sizeColumn As New NSTableColumnMBS("size")
sizeColumn.title = "Size"
sizeColumn.width = 100
sizeColumn.Editable = False
table.addTableColumn sizeColumn

Var scroll As New NSScrollViewMBS(20, 20, 400, 300)
scroll.documentView = table
scroll.hasVerticalScroller = True
Self.NSWindowMBS.contentView.addSubview scroll

The NSTableColumn determines the width and width limits, resizability, and editability of its column in the NSTableView. It also stores two NSCell objects: the header cell, which is used to draw the column header, and the data cell, used to draw the values for each row. You can control the display of the column by setting the subclasses of NSCell used and by setting the font and other display characteristics for these NSCells. For example, you can use the default NSTextFieldCell for displaying string values or substitute an NSImageCell to display pictures.

Constants

Constant Value Description
NSTableColumnAutoresizingMask 1 One of the constants specify the resizing modes available for the table column. Allows the table column to resize automatically in response to resizing the tableview. Enabling this option is the same as enabling the "Live Resizable" option in Interface Builder. The resizing behavior for the table view is set using the NSTableView method setColumnAutoresizingStyle:. more
NSTableColumnNoResizing 0 One of the constants specify the resizing modes available for the table column. Prevents the table column from resizing.
Available in Mac OS X v10.4 and later.
NSTableColumnUserResizingMask 2 One of the constants specify the resizing modes available for the table column. Allows the table column to be resized explicitly by the user. Enabling this option is the same as enabling the "User Resizable" option in Interface Builder.
Available in Mac OS X v10.4 and later.

This class has no subclasses.

Blog Entries

Xojo Developer Magazine

Some methods using this class:

Some properties using this class:

Some events using this class:

Some examples using this class:

Some related classes:


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


NSSymbolWiggleEffectMBS   -   NSTableDataSourceMBS


The biggest plugin in space...