• 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: Disabling clickable header in an NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disabling clickable header in an NSTableView


  • Subject: Re: Disabling clickable header in an NSTableView
  • From: Stephane Sudre <email@hidden>
  • Date: Fri, 2 Jun 2006 16:08:03 +0200


On 2 juin 06, at 08:47, email@hidden wrote:

Hi,

I'd like to disabling sorting in an NSTableView to implement a filter like in
iTunes. I've found a solution that generally works for me here:


http://www.cocoabuilder.com/archive/message/cocoa/2005/9/6/145803

But it is still possible to click into the header which flashes shortly. Of
course nothing happens, but I'd like to stop the flashing too. How can I
realise that?

Stupid ideas:

* First solution (super thrill seeker and stupid)

1. Write a category of NSTableHeaderView to be able to get/set the _reserved4 BOOL

2. Override the mouseDown: method to do nothing when _reserved4 is YES (because the default value is probably NO)

3. Use the [NSTableView headerView] to access the instance of NSTableHeaderView whose behavior you want to modify and set the _reserved4 flag to YES.

* Second solution

1. Write a subclass of NSTableView with a new ivar: canClickInHeaderView (default being NO)

2. Replace NSTableView with your new class

3. Write a category of NSTableHeaderView and override the mouseDown: method. Check that:

[((MyTabView *) [self tableView]) canClickInHeaderView]==NO and just returns if it's the case.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Disabling clickable header in an NSTableView
      • From: email@hidden
References: 
 >Disabling clickable header in an NSTableView (From: email@hidden)

  • Prev by Date: getting things out of and putting thins in the doc
  • Next by Date: Core Data Problem with [NSCFNumber _isKindOfEntity:]
  • Previous by thread: Disabling clickable header in an NSTableView
  • Next by thread: Re: Disabling clickable header in an NSTableView
  • Index(es):
    • Date
    • Thread