NSPathControl is a subclass of
NSControl that represents a file system path or virtual path.
- macOS 10.5+
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:
NSPathControl has three styles represented by the
NSPathStyle enumeration constants
popUp. 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,
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. In OS X v10.5 the value returned by
nil, in macOS 10.6 and later,
clickedPathComponentCell() returns the clicked cell.