开发者

NSTableView: How do you update a displayed tooltip?

For my NSTableView, I have defined

 -tableView:toolTipForCell:rect:tableColumn:row:mouseLocation:

and this does return the string I want to display and the NSTableView does display that string as a tooltip.

The problem is that while the tooltip is being displayed, I click the mouse in the same table cell and this will cause the method above to return a different string. However, I cannot seem to figure out how to tell the table that it needs to update the tooltip being displayed.

I did try calling -removeAllToolTips, but that did nothing, as expected.

I can get the tooltip to disappear by calling [sender setToolTip:@""]; Although, it disappears suddenly, rather then a nice, slow fade out.

However, the tooltip does not reappear with the updated text unless I move the mouse and wait....not q开发者_运维百科uite the behavior I want.

Is there anyway to tell the table that it needs to update the tooltip being displayed?

Any other ideas or thoughts on how to handle this better?


It is not possible at this time.


Have you tried:

[aTableView setNeedsDisplayInRect:[aTableView rectOfRow:row]];

Where "row" is the one in question?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜