ronenmagid1
asked on
Cocoa Application - Tooltip
On my Mac/Cocoa I'm programmatically displaying a bitmap - projecting it using using "drawInRect" onto one of my NSView instances.
I'd like this bitmap to have a tooltip.
As I'm new to Mac programming, I'd appreciate any pointer you may have.
I'd like this bitmap to have a tooltip.
As I'm new to Mac programming, I'd appreciate any pointer you may have.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I do not see your code. If it is about Cocoa (you make Mac OS application), and if you have only the window (NSWindow), I think, you need to make a custom view (NSView). NSView knows how to work with the tooltips. You will set all parameters and it will work. It is a bit late here to test right now. For any control, as you see, it is a trivial task to add a tooltip.
Have you read this article?
http://projects.autonomy.net.au/ai/chrome/site/resource/ebooks-programming/cocoa/cocoa-programming/0672322307_ch20lev1sec2.html
Have you read this article?
http://projects.autonomy.net.au/ai/chrome/site/resource/ebooks-programming/cocoa/cocoa-programming/0672322307_ch20lev1sec2.html
Try this code:
[myView setToolTip:@"This is a test view"];
I didn't test it.
I took it from here:
http://www.mail-archive.com/cocoa-dev@lists.apple.com/msg48345.html
[myView setToolTip:@"This is a test view"];
I didn't test it.
I took it from here:
http://www.mail-archive.com/cocoa-dev@lists.apple.com/msg48345.html
ASKER
Thanks. That did it.
ASKER