Re: Multiple windows in a doc based app How-To
Re: Multiple windows in a doc based app How-To
- Subject: Re: Multiple windows in a doc based app How-To
- From: Jeff Gilbert <email@hidden>
- Date: Sat, 2 Mar 2002 18:49:42 -0600
On Saturday, March 2, 2002, at 01:55 PM, Joseph Jones wrote:
On a side note, I'd like to add a little sort up/down arrow to my table
column headers to show my current sort direction for that column. Where
can I hook to do this? Is there a character for these arrows, or will I
have to use NSBezierPath to draw it?
To set an image in a table column, use [NSTableView
setIndicatorImage:inTableColumn]. Currently, there are two undocumented
selectors on NSTableView, _defaultTableHeaderSortImage and
_defaultTableHeaderReverseSortImage. These return up and down arrows.
So, to set the correct image in your table, do something like the
following:
if (ascending)
[table setIndicatorImage:[NSTableView
_defaultTableHeaderSortImage] inTableColumn:sortColumn];
else
[table setIndicatorImage:[NSTableView
_defaultTableHeaderReverseSortImage] inTableColumn:sortColumn];
Of course, those two selectors may disappear in the future, so you
should do a runtime check to make sure they are there.
Jeff Gilbert
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.