2011-06-28 87 views
1

我想顯示鼠標懸停在NSImageCell上的工具提示。我試過在Interface Builder上設置屬性(包含NSImageCell和NSTableColumn),但它不起作用。NSImageCell:設置工具提示

任何想法?

回答

1

我解決了這個由控制器中重寫此方法爲我NSOutlineView:

- (NSString *)outlineView:(NSOutlineView *)outlineView toolTipForCell:(NSCell *)cell rect:(NSRectPointer)rect tableColumn:(NSTableColumn *)tableColumn item:(id)item mouseLocation:(NSPoint)mouseLocation; 
1

NSTableView情況下,你可以使用

(NSString *)tableView:(NSTableView *)tableView toolTipForCell:(NSCell *)cell rect:(NSRectPointer)rect tableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row mouseLocation:(NSPoint)mouseLocation;