Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

NSPathControlMBS class

Super class: NSControlMBS

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Cocoa Controls MBS MacCocoa Plugin 12.0 Yes No No Yes, macOS only No
Function: NSPathControl is a subclass of NSControl that represents a file system path or virtual path.
Notes:
The NSPathControl class uses NSPathCell to implement its user interface. NSPathControl provides cover methods for most NSPathCell methods—the cover method simply invokes the corresponding cell method. See also NSPathComponentCell, which represents individual components of the path, and two associated protocols: NSPathCellDelegate and NSPathControlDelegate.

NSPathControl has three styles represented by the NSPathStyle enumeration constants NSPathStyleStandard, NSPathStyleNavigationBar, and NSPathStylePopUp. The represented path can be a file system path or any other type of path leading through a sequence of nodes or components, as defined by the programmer.

NSPathControl automatically supports drag and drop, which can be further customized via delegate methods. To accept drag and drop, NSPathControl calls registerForDraggedTypes: with NSFilenamesPboardType and NSURLPboardType. When the URL value in the NSPathControl object changes because of an automatic drag and drop operation or the user selecting a new path via the open panel, the action is sent. On Mac OS X v10.5 the value returned by clickedPathComponentCell is nil, on Mac OS X v10.6 and later, clickedPathComponentCell returns the clicked cell.
Subclass of the NSControlMBS class.

Feedback, Comments & Corrections

Path Style Constants

Constant Value Description
NSPathStyleNavigationBar 1 The navigation bar display style and behavior. Similar to the NSPathStyleStandard with the navigation bar drawing style. Also known as the breadcrumb style.
Available in Mac OS X v10.5 and later.
NSPathStylePopUp 2 The pop-up display style and behavior. Only the last path component is displayed with an icon image and component name. The full path is shown when the user clicks on the cell. If the cell is editable, a Choose item is included to enable selecting a different path.
Available in Mac OS X v10.5 and later.
NSPathStyleStandard 0 The standard display style and behavior. All path component cells are displayed with an icon image and component name. If the path can not fully be displayed, the middle parts are truncated as required.
Available in Mac OS X v10.5 and later.

Super class NSControlMBS

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

This class has no sub classes.

Some examples which use this class:

Blog Entries


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


NSPathComponentCellMBS   -   NSPDFImageRepMBS




Links
MBS FileMaker tutorial videos