Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Table Title Headers



On 8/28/03 6:32 PM, "Cory Loken" <email@hidden> wrote:

> I am trying to figure out how to have a table column header turn blue
> and have the arrow icon appear when a table is sorted by that header.
> Does anybody have any suggestions on how to do this. I have the columns
> sorting fine, so all I need is the actual cosmetic changes.

call method "setHighlightedTableColumn:" of theTable with parameter
theColumn

Where theColumn is the clicked column. For example if you use

on clicked theColumn


end clicked

It's the object that's clicked.

(Or


(call method "tableColumnWithIdentifier:" of theTable with parameter
columnIdentifier)


where columnIdentifier is the identifier of the column as set in Interface
Builder/Attributes (you can make it the same as the AppelScript name if you
wish to keep it simple).

That will highlight the header cell of the column. I haven't tried the arrow
icon yet, but I think you do it by

call method "setIndicatorImage:inTableColumn:" of theTable with
parameters {(call method "imageNamed:" of class "NSImage" with parameter
"NSAscendingSortIndicator"), theColumn)

For the ^ up=arrow and "NSDescendingSortIndicator" for the v down-arrow.

--
Paul Berkowitz
_______________________________________________
applescript-studio mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-studio
Do not post admin requests to the list. They will be ignored.

References: 
 >Table Title Headers (From: Cory Loken <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.