• 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
Buttons with images in NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Buttons with images in NSTableView


  • Subject: Buttons with images in NSTableView
  • From: email@hidden
  • Date: Mon, 22 Nov 2004 10:25:54 +0000

Hi

I have an NSTableView showing information about retailers, a row for each retailer. One column shows the retailer's logo and I want it to be a push button that the user can click to go to the retailer's website.

I can use an NSButtonCell for this, but can see no way to set different images for each row.  Alternatively I can use an NSImageCell and then can set different images but can't set an action method on the imageCell.

I've resorted to using the NSTableView's tableViewSelectionDidChange: method and going to the website there, but even this is not ideal as I can see no way to work out whether the user clicked the logo or another column. I guess I could get the cursor position and see if that's in the imageCell.

Surely I'm being daft - there must be an easy way to accomplish this!  Any ideas?

Thanks

Duncan

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Buttons with images in NSTableView
      • From: Ricky Sharp <email@hidden>
  • Prev by Date: Re: How to disable/gray an NSTextfield (used as static text)
  • Next by Date: Re: Using bindings to set the value of an NSTextView
  • Previous by thread: Re: Cocoa-dev Digest, Vol 1, Issue 311
  • Next by thread: Re: Buttons with images in NSTableView
  • Index(es):
    • Date
    • Thread