Formatting Cells inside a Table? Is this possible?

I’m a newbie, so I don’t understand if this is possible or not…

Can you dynamically affect the formatting of individual cells or rows INSIDE a table in any way?

In other words, can I set row 2 of a table to have a bold font, or red text color?

Specifically, I’m trying to dynamically set the backround color of rows of a table.


In case this isn’t possible, I’m also curious about possible workarounds:

  • Would it be possible to set the background of the table to be transparent, and dynamically put colored images behind individual rows?

  • Is there some other workaround I’m not thinking of?

  • Is this (shudder) possible in cocoa, but not AppleScript?

After more research, I’m getting the idea that affecting text formatting INSIDE a table in any way is not possible with AppleScript Studio.

So now I have a less amibitious goal. Can I set the text font of an ENTIRE table from my script? I’d like to let my user call up a font panel, set the font, and then set a table’s font with that info.

The problem is that I can’t get it to work. I’ve found a snippet that makes a cocoa call to do this, but it doesn’t work. Any suggestions?

set font of (table view "eventTable" of scroll view "eventScroll" of split view "MainSplit" of window "main") to call method "fontWithName:size:" of class "NSFont" with parameters {"Lucida Grande-Regular", 14}

OK. i think i’ve figured out conceptually how to set the font of an ENTIRE table, but i can’t figure out how to do it in practice.

it seems like you can set a prototype cell that all cells in the table will pick up from.

any suggestions?