• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sorting columns of non-reorderable columns tableview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sorting columns of non-reorderable columns tableview


  • Subject: Re: Sorting columns of non-reorderable columns tableview
  • From: Stéphane Sudre <email@hidden>
  • Date: Fri, 7 Sep 2001 11:39:18 +0200

On jeudi, septembre 6, 2001, at 08:11 PM, John Hansen wrote:

Help...

[crunch]

Nothing in the following answer is from my brain, I just have copy it in Stickies and use it but don't remember the original author name (so credits go to these persons):

First step: retrieve the Triangle tiff
-----------

[[[NSTableView _defaultTableHeaderSortImage]
TIFFRepresentation]
writeToFile: @"/temp/down_arrow.tiff"
atomically: YES];

[[[NSTableView _defaultTableHeaderReverseSortImage]
TIFFRepresentation]
writeToFile: @"/temp/up_arrow.tiff"
atomically: YES];

Second Step: Implement the delegate method tableView:(NSTableView*)tableView didClickTableColumn:(NSTableColumn *)tableColumn
------------

- (void) tableView:(NSTableView*)tableView didClickTableColumn:(NSTableColumn *)tableColumn
{
// check to see if this column was already the selected one and if so invert the sort function.

if ([currentSortedColumn_ isEqualToString:[tableColumn identifier]]==YES)
{
}
else
{
// if there already was a sorted column, remove the indicator image from it.
}

// set the indicator image in the newly selected column

// set the highlighted table column.

// Sort
}


References: 
 >Sorting columns of non-reorderable columns tableview (From: John Hansen <email@hidden>)

  • Prev by Date: Locking Files?
  • Next by Date: Re: disable options in finder
  • Previous by thread: Sorting columns of non-reorderable columns tableview
  • Next by thread: Re: Sorting columns of non-reorderable columns tableview
  • Index(es):
    • Date
    • Thread