• 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
NSOutlineView subclass
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSOutlineView subclass


  • Subject: NSOutlineView subclass
  • From: marca <email@hidden>
  • Date: Mon, 29 Mar 2004 20:06:57 +0200

Hi there,


I've sub-classed NSOutlineView in order to mimic iTunes' source list box (or Finder's side bar) which means that, when a row is selected, its background is drawn using a blue gradient instead of the standard theme color (aqua blue in most of case).

I have some newbie questions concerning that :

1/ Concerning the disclosure triangle :

Since I draw the entire row by myself, using the drawRow:(int)rowIndex clipRect:(NSRect)clip event, I had to take care of disclosure triangle drawing. Is there any other method ? If not, how can I provide the user with some sort of feedback when he/she clicks on the disclosure triangle (i.e. make it darker on mousedown) ? I've tried the NSOUtlineView's collapsing and expanding delegates but all of them fires at mouseup only and therefore cannot be used to draw the disclosure rect in another state. If there's an event that fires on mousedown, how do I drawn in the desired row ?

2/ NSOutlineView parent classes :

I thought that NSOutlineView was a subclass of NSTableView. I've set-up the delegate of my NSOutlineView to its subclass 'MyOutlineView' (From where I do the drawing stuff) but NSTableView's delegate methods (i.e. tableViewSelectionDidChange: and tableViewSelectionIsChanging:) doesn't fire when the user selects a row in the outline view. How can I respond to row selection without having to respond to the global IBAction Action: ?

3/ Column relative size :

There's only one header in this Outline View and I would like its size to be equal to the width of the outline view at every time, but I haven't figure yet how can I make its width relative (i.e. make it 100% of the width of the Outline view). Any idea ?


Thanks !


-- marca
_______________________________________________
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.


  • Follow-Ups:
    • Re: NSOutlineView subclass
      • From: Eric Forget <email@hidden>
  • Prev by Date: Re: SIGIO and AppKit main loop
  • Next by Date: Re: Developer Resource site
  • Previous by thread: Re: Getting glyphs and their outlines
  • Next by thread: Re: NSOutlineView subclass
  • Index(es):
    • Date
    • Thread