• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to make NSImageView respond like NSButton?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to make NSImageView respond like NSButton?


  • Subject: Re: How to make NSImageView respond like NSButton?
  • From: Fritz Anderson <email@hidden>
  • Date: Mon, 30 Jun 2003 09:31:23 -0500

NSImageView sends its action message only when its image is changed by the user, not when it is clicked. That is the nature of the image-view interface -- it is a tool for images. You want a control that sends its action message when it is clicked; the control that does that is an NSButton. It is easy to configure an NSButton so it shows an image, even without borders and highlighting (though doing so would constitute "user-interface hiding," an engineering blunder).

-- F

On Monday, June 30, 2003, at 09:03 AM, Poornima Ranganath wrote:

I have a NSImageView which dispalys a logo,When a
user clicks the logo, i need to launch a website.That
is NSImageView should act like a button. How is this
to be handled? i have made a connection to the
NSImageView and my class through an Action message,
but the action message does not get called.
the Action Msg looks like

-(IBAction) clickImageView:(id) sender.
this does not get called at all. How will i make the
NSImageView call the above Action Method so as to say
make it work like a button?

I read some where in the documentation that i need to
use "sendAction" in "mouseDown", but i am doing
someother stuff in mousedown and don't want to call
the "sendAction" for NSImageView there.
How can my problem be solved?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >How to make NSImageView respond like NSButton? (From: Poornima Ranganath <email@hidden>)

  • Prev by Date: Re: Writing Files
  • Next by Date: Re: Calloc for Cocoa?
  • Previous by thread: How to make NSImageView respond like NSButton?
  • Next by thread: Re: Writing Files
  • Index(es):
    • Date
    • Thread