0
votes

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.

1
If you're referring to tooltips, the easiest way to use them is setToolTip: (with an NSString* value) in NSView. There are other methods that give you more control over them.Kevin Grant
@KevinGrant Exactly what I was looking for! Could you post your comment as an answer so I can select it?fdh

1 Answers

5
votes

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.