< Previous PageNext Page > Hide TOC

About Tables

An NSTableView object displays data for a set of related records, with rows representing individual records and columns representing the attributes of those records. A record is a set of values for a particular real-world entity, such as an employee or a bank account. For example, in a table of employee records, each row represents one employee, and the columns represent such attributes as the first and last name, address, salary, and so on. A table view is usually displayed inside a scroll view, like this:


image: Art/nstableview_sample.gif

In this illustration, the NSTableView object draws the table values while auxiliary views draw the column headers and adornments such as the blank square above the vertical scroller. The roles of these auxiliary views are discussed in “The Parts of a Table.”

The user selects rows or columns in the table by clicking them. The user edits individual cells by double-clicking. The user can rearrange columns by dragging the column headers and can resize the columns by dragging the divider between two column headers. You can configure the table to support the selection of multiple rows or columns. You can also configure it to support no selected rows or columns, which you might do to prevent the user from editing or rearranging them. You can also specify an action message to be sent when the user double-clicks something other than an editable cell.



< Previous PageNext Page > Hide TOC


© 1997, 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-04-04)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.