Centering the disclosure triangle in and ouline view cell
Centering the disclosure triangle in and ouline view cell
- Subject: Centering the disclosure triangle in and ouline view cell
- From: Keith Blount <email@hidden>
- Date: Sun, 13 Feb 2005 16:34:52 -0800 (PST)
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
Hello,
I am trying to create an outline view similar to the
one in Mail.app, so that some rows are larger than
others. I have achieved this by subclassing
NSOutlineView and overriding the height calculation
methods such as rectOfRow: and
frameOfCellAtColumn:row: etc. So far, so good - I can
make some rows 32 pixels high and others 16 pixels
high, just as in Mail.app.
I am using ImageAndTextCell from the AppKit examples
for my cell, though I have altered this class slightly
by using drawInteriorWithFrame:inView: to centre the
text in the text cell vertically.
The main problem that remains is that the disclosure
triangles are not centred vertically - they always
appear at the top of the cell, which is ugly in the
32-pixel-high cells. It seems that NSOutlineView uses
-rowHeight in some way to calculate the position of
the disclosure triangle, which obviously doesn't work
with my subclass because all of the row heights are
different - but I cannot find the method I need to
override to alter this.
Does anybody know what method I have to override/what
I need to do to make sure that the disclosure
triangles are centred vertically in my subclass?
Many thanks in advance for any help,
Keith
__________________________________
Do you Yahoo!?
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250
_______________________________________________
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