• 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
Determining width of a cell in an NSOutlineView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Determining width of a cell in an NSOutlineView


  • Subject: Determining width of a cell in an NSOutlineView
  • From: Eric Gorr <email@hidden>
  • Date: Fri, 19 Dec 2008 16:35:51 -0500

I only have a single column in my NSOutlineView.

The outline view looks like:

> Collapsible Row 1
    Item 1

> Collapsible Row 2
    Item 2

I need the height of a row an of an item displayed when the disclosure triangle is clicked to be based on the width of the cell.

I can get the indentation level by doing:

NSInteger level	= [outlineView levelForItem:item];

and the amount that is indented per level by doing:

CGFloat indentation = [outlineView indentationPerLevel];		


Asking for the width of the column does not return the same width of the bounds parameter when drawInteriorWithFrame is called for my cell.



What looks like could work is to get the frame of the NSOutlineView and then subtract the width of the frame by:


    indentation * (level + 1)

but this doesn't seem like it should be the right answer.


There doesn't seem to be a method I can call to obtain the bounds that will be passed into drawInteriorWithFrame for my cell. Have I missed something?



Any other ideas?

thank you.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Determining width of a cell in an NSOutlineView
      • From: Corbin Dunn <email@hidden>
  • Prev by Date: populate/resize an already open NSMenu in background
  • Next by Date: Re: Determining width of a cell in an NSOutlineView
  • Previous by thread: Re: populate/resize an already open NSMenu in background
  • Next by thread: Re: Determining width of a cell in an NSOutlineView
  • Index(es):
    • Date
    • Thread