Inherits from: NSView : NSResponder : NSObject
Conforms to: NSCoding
(NSResponder)
NSObject (NSObject)
Declared in: AppKit/NSTabView.h
The NSTabView class and its supporting class NSTabViewItem are under development. If you want to use these classes, you will have to instantiate them programmatically because Interface Builder does not yet include support for them. |
Constant | Description |
NSTopTabsBezelBorder |
The view includes tabs and has a bezeled border (the default) |
NSNoTabsBezelBorder |
The view does not include tabs and has a bezeled border |
NSNoTabsLineBorder |
The view does not include tabs and has a lined border |
NSNoTabsNoBorder |
The view does not include tabs and has no border |
- Adding and removing tabs
- - addTabViewItem:
- - insertTabViewItem:atIndex:
- - removeTabViewItem:
- Accessing tabs
- - indexOfTabViewItem:
- - indexOfTabViewItemWithIdentifier:
- - numberOfTabViewItems
- - tabViewItemAtIndex:
- - tabViewItems
- Selecting a tab
- - selectFirstTabViewItem:
- - selectLastTabViewItem:
- - selectNextTabViewItem:
- - selectPreviousTabViewItem:
- - selectedTabViewItem
- - selectTabViewItemAtIndex:
- - takeSelectedTabViewItemFromSender:
- Modifying the font
- - font
- - setFont:
- Modifying the tab type
- - setTabViewType:
- - tabViewType
- Manipulating the background
- - drawsBackground
- - setDrawsBackground:
- Determining the size
- - minimumSize
- - contentRect
- Truncating tab labels
- - allowsTruncatedLabels
- - setAllowsTruncatedLabels:
- Assigning a delegate
- - setDelegate:
- - delegate
- Event handling
- - tabViewItemAtPoint:
- (void)addTabViewItem:(NSTabViewItem
*)tabViewItem
See Also: - insertTabViewItem:atIndex:, - numberOfTabViewItems, - removeTabViewItem:, - tabViewItemAtIndex:, - tabViewItems
- (BOOL)allowsTruncatedLabels
YES
if
the tab view allows truncating for labels that don't fit on a
tab. The default is NO
.
When truncating is allowed, the tab view inserts an ellipsis, if necessary,
to fit a label in the tab. See Also: - setAllowsTruncatedLabels:
- (NSRect)contentRect
- (id)delegate
See Also: - setDelegate:
- (BOOL) drawsBackground
YES
if
the tab view draws a background color when the tab view type is NSNoTabsNoBorder
.
If the tab view uses bezeled edges or a line border, the appropriate
background color for that border is used. See Also: - setTabViewType:, - setDrawsBackground:
- (NSFont *)font
See Also: - setFont:
- (int)indexOfTabViewItem:(NSTabViewItem
*)tabViewItem
NSArray.NotFound
if
the item is not found. A tab view keeps an array
containing one tab view item for each tab in the view-this is
the array that is searched. The returned index is base 0.See Also: - indexOfTabViewItemWithIdentifier:, - insertTabViewItem:atIndex:, - numberOfTabViewItems, - tabViewItemAtIndex:
- (int)indexOfTabViewItemWithIdentifier:(id)identifier
NSArray.NotFound
if
the item is not found. A tab view keeps an array
containing one tab view item for each tab in the view-this is
the array that is searched. The returned index is base 0.See Also: - indexOfTabViewItem:, - insertTabViewItem:atIndex:, - numberOfTabViewItems, - tabViewItemAtIndex:
- (void)insertTabViewItem:(NSTabViewItem
*)tabViewItem atIndex:(int)index
See Also: - indexOfTabViewItem:, - indexOfTabViewItemWithIdentifier:, - numberOfTabViewItems, - tabViewItemAtIndex:
- (NSSize)minimumSize
See Also: - setTabViewType:
- (int)numberOfTabViewItems
See Also: - indexOfTabViewItem:, - tabViewItems
- (void)removeTabViewItem:(NSTabViewItem
*)tabViewItem
See Also: - addTabViewItem:, - insertTabViewItem:atIndex:, - tabViewItems
- (void)selectFirstTabViewItem:(id)sender
See Also: - selectTabViewItem:
- (void)selectLastTabViewItem:(id)sender
See Also: - selectTabViewItem:
- (void)selectNextTabViewItem:(id)sender
See Also: - selectTabViewItem:
- (void)selectPreviousTabViewItem:(id)sender
See Also: - selectTabViewItem:
- (NSTabViewItem *)selectedTabViewItem
nil
if
no item is selected. If there is a delegate and
the delegate supports it, sends the delegate the tabViewShouldSelectTabViewItemtabView:shouldSelectTabViewItem: message.See Also: - selectTabViewItemAtIndex:
- (void)selectTabViewItem:(NSTabViewItem
*)tabViewItem
See Also: - insertTabViewItem:atIndex:, - selectedTabViewItem
- (void)selectTabViewItemAtIndex:(int)index
See Also: - insertTabViewItem:atIndex:, - selectedTabViewItem
- (void)selectTabViewItemWithIdentifier:(id)identifier;
See Also: - setIdentifier: (NSTabViewItem) - identifier (NSTabViewItem), - selectTabViewItemAtIndex:, - selectedTabViewItem
- (void)setAllowsTruncatedLabels:(BOOL)allowTruncatedLabels
See Also: - allowsTruncatedLabels
- (void)setDelegate:(id)anObject
See Also: - delegate
- (void)setDrawsBackground:(BOOL)flag
NSNoTabsNoBorder
. If
the tab view has a bezeled border or a line border the appropriate
background for that border is used.See Also: - setTabViewType:, - drawsBackground
- (void)setFont:(NSFont
*)font
See Also: - allowsTruncatedLabels, - font, - setAllowsTruncatedLabels:
- (void)setTabViewType:(NSTabViewType)tabViewType
Tab Type | Description |
NSTopTabsBezelBorder |
The view includes tabs and has a bezeled border (the default) |
NSNoTabsBezelBorder |
The view does not include tabs and has a bezeled border |
NSNoTabsLineBorder |
The view does not include tabs and has a lined border |
NSNoTabsNoBorder |
The view does not include tabs and has no border |
See Also: - tabViewType
- (NSTabViewItem *)tabViewItemAtIndex:(int)index
See Also: - indexOfTabViewItem:, - insertTabViewItem:atIndex:, - tabViewItems
- (NSTabViewItem *)tabViewItemAtPoint:(NSPoint)point
- (NSArray *)tabViewItems
See Also: - numberOfTabViewItems, - tabViewItemAtIndex:
- (NSTabViewType)tabViewType
- (void)takeSelectedTabViewItemFromSender:(id)sender
The location of the selected cell is a zero-based number, obtained by counting the number of cells up to and including the selected cell. Cells are counted from left to right and from top to bottom. For example in a 5 by 5 matrix, if the selected cell is three rows down in column five (location [2,4] in the matrix), the corresponding index would be 14.