fdh
fdh

Reputation: 5344

Hovering cursor over an image?

I have a cell of an NSImageView subclass. I want a small textbox to popup when the user overs their cursor over the image.

An example of what I am looking for is the "yellow textbox" that pops up when you hover your cursor over an image in a web browser. For example hovering your cursor over the Google logo brings up the text "Google" in a small textbox.

How would I go about doing this? Note I am developing an app for OSX not iOS. I am using Xcode 3.2.6.

Upvotes: 0

Views: 726

Answers (1)

Kevin Grant
Kevin Grant

Reputation: 5431

You can do this with setToolTip: on an NSView (for a string) or use other tooltip-related NSView methods to have more control over the result.

Upvotes: 5

Related Questions