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

Re: Buttons with images in NSTableView


  • Subject: Re: Buttons with images in NSTableView
  • From: Ricky Sharp <email@hidden>
  • Date: Mon, 22 Nov 2004 06:18:39 -0600

On Monday, November 22, 2004, at 04:27AM, <email@hidden> wrote:

>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.

What are the attributes of your NSButtonCell?  I would assume that you can use say a square button that can show an image.  You should then be able to set an unique image for each cell using setImage:

Another thing you could do is write your own custom cell which derives from NSActionCell.  The designated initializer you'd use in your subclass would be initImageCell.

--
Rick Sharp
Instant Interactive(tm)

 _______________________________________________
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

References: 
 >Buttons with images in NSTableView (From: email@hidden)

  • Prev by Date: Re: mouse location across multiple monitors
  • Next by Date: Re: [NSMatrix putCell:] raising an exception
  • Previous by thread: Buttons with images in NSTableView
  • Next by thread: Re: Buttons with images in NSTableView
  • Index(es):
    • Date
    • Thread