Re: Dynamically change button cell image within a table view
Re: Dynamically change button cell image within a table view
- Subject: Re: Dynamically change button cell image within a table view
- From: Andrew Thomson <email@hidden>
- Date: Mon, 18 Feb 2008 16:51:32 -0800
Philip,
Thanks for all your help, but I appear to be missing something. Below are two code examples but neither work. Any feedback would be greatly appreciated. Thanks. --Andrew
EXAMPLE 1:
set theDataRow to make new data row at end of data rows of theDataSource
set theCell to the data cell "icon" of theDataRow
set img to load image "img_class"
set theCell to call method "setImage:" of theCell with parameter img
EXAMPLE 2:
on clicked theObject
set img to load image "img_class"
call method "setImage:" of theOject with parameter img
end clicked
On Monday, February 18, 2008, at 04:14AM, "Philip Aker" <email@hidden> wrote:
>On 2008-02-17, at 20:53:47, Andrew Thomson wrote:
>
>> I would love it if you could point me to one? The ones I've found
>> in the archive exhaustively cover image cells but next to nothing
>> about setting the image of a button cell. The class reference for
>> NSButtonCell mentions the setImage method but I can't find any
>> examples specific to NSButtonCells and my implementation of the
>> method doesn't yield any results (nor errors). Any help would be
>> appreciated. --Andrew
>
>I misread your post and was indeed thinking of image cells.
>Here's how to use setImage for a button cell in a table (for instance
>in 'will display cell'):
>
> set img to load image "img2"
> call method "setImage:" of theCell with parameter img
>
>
>Philip Aker
>echo email@hidden@nl | tr a-z@. p-za-o.@
>
>
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden