nstablecellview

Custom drag image with NSTableView as drag source

耗尽温柔 提交于 2019-11-29 14:36:51
Is it necessary to subclass NSTableView or NSTableCellView to create a custom drag image when the tableView is the drag source? If not, what is the magic method I am missing to do this? I cannot seem to find anything solid. NSTableCellView subclasses have can (slightly mysteriously) override: @property(retain, readonly) NSArray *draggingImageComponents (array of NSDraggingImageComponent instances that will get composited together (who knows in what fashion they get composited...)) NSTableView itself has - (NSImage *)dragImageForRowsWithIndexes:(NSIndexSet *)dragRows tableColumns:(NSArray *

View-based NSOutlineView without NIB?

不想你离开。 提交于 2019-11-29 14:28:59
问题 NSOutlineView is a subclass of NSTableView . And currently, NSTableView supports two implementations. Cell-based. View-based. To make OSX 10.8 Finder style side bar ( with automatic gray Icon styling ), need to use view-based table view with source-list highlight style. With NIBs, this is typical job. Nothing hard. (see SidebarDemo) But I want to avoid any NIBs or Interface Builder. I want make the side bar purely programmatically. In this case, I have big problem. AFAIK, there's no way to

NSTableView - select row and respond to mouse events immediately [duplicate]

孤人 提交于 2019-11-28 10:34:05
This question already has an answer here: Respond to mouse events in text field in view-based table view 5 answers I have a view based NSTableView in which the cells contain a number of controls including text fields and edit fields. When a user tries to click on a control within a cell in order to, for example, start editing a text field, the click's main objective is ignored and the cell gets selected. Another click is then needed to perform the action originally intended, and even this click is subject to a delay before it's taken into account. How can I avoid this problem and have the row