Clickable NSIMageView in view-based table view

Discussion in 'Mac Programming' started by Starfox, Mar 6, 2012.

  1. macrumors regular

    Joined:
    Apr 7, 2011
    #1
    I'm trying to make a clickable or double-clickable NSImageView in a view-based table view. I subclassed NSImageView and overrode mouseUp:, but it's not even getting called. I checked that the image view class in IB is set to MyImageView, it's enabled, doesn't refuse first responder and is editable. What am I missing?
     
  2. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    You probably have to override mouseDown: and handle the event tracking yourself if you want it to behave like a normal button.
     
  3. thread starter macrumors regular

    Joined:
    Apr 7, 2011
    #3
    Nope, it works just fine when the image view isn't in a view-based table view.
     
  4. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #4
    Is the table getting the message and consuming it before your view gets a chance?
     
  5. thread starter macrumors regular

    Joined:
    Apr 7, 2011

Share This Page