nspathcontrol

Use of NSPathControl to represent virtual path

余生颓废 提交于 2020-05-31 04:47:10
问题 When NSPathControl is used to represent path on local machine is fine! The problem rise when I try to represent a virtual path of a remote server; in such case I have to change the icons accordingly. The picture represents what I obtain that is not what I like. Now the question: How to change the icon of each element of the NSPathControl ? Apple documentation is quite opaque about. The only similar post is Customise NSPathControl but seems quite outdated. 回答1: Masybe not the best, but is

Customise NSPathControl

雨燕双飞 提交于 2020-04-11 12:01:08
问题 I would like to make a custom NSPathControl . NSPathCell has the method + pathComponentCellClass , where you can return the custom class of the component cells. I have a NSPathComponentCell subclass, which I return right there, but it doesn't work. The method does not get called. Why? In the documentation is says: Subclasses can override this method to return a custom cell class that is automatically used. By default, the method returns [NSPathComponentCell class], or a specialized subclass

How do I make an NSPathControl look like other dropdown boxes?

末鹿安然 提交于 2019-12-11 05:53:31
问题 I'm wrestling with NSPathControl . Specifically, I have a dialog (generated by a NIB) which asks the user for a title and a path. The path is supposed to be a local path on the user's hard drive. So, in Xcode 4, I dragged in an NSPathControl . In the Attributes inspector, I set its style to "Pop Up". This pretty much works like I expect. If I click it, I get a menu with a few common paths or paths related to the current selection, and a "Choose..." option which opens up a dialog box and