Re: Buttons with images in NSTableView
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