Re: NSTableView modifications
Re: NSTableView modifications
- Subject: Re: NSTableView modifications
- From: "Rand Arnold" <email@hidden>
- Date: Thu, 13 Feb 2003 07:31:25 -0800
Thanks to Brian, I now have my NSTableView behaving as I would wish. If
anybody is interested in the details, let me know.
The only thing missing at this time is drawing the NSTableHeaderCells so
that they have the proper Aqua appearance.
Do anybody know what system call I can make to get the colors necessary
for drawing the gradients in the headers?
Thanks,
Rand
-----------
Rand Arnold
email@hidden
On or about: 1/15/03 at 23:20 -0600, Brian Webster wrote:
>
On Wednesday, January 15, 2003, at 10:31 PM,
>
email@hidden wrote:
>
>
> I have a NSTableView that I would like to tweak in a way I have not
>
> seen done.
>
>
>
> I would like to change the height of the NSTableHeaderView enough so
>
> that
>
> I can display text in the NSTableHeaderCells rotated by -90 degrees.
>
>
>
> so I need to get the NSTableHeaderCell to draw text with an arbitrary
>
> rotation, I'm guessing using an NSAffineTransform?
>
> and I need to change the height of the NSTableHeaderView to accommodate
>
> the length (height?) of the rotated text.
>
>
As far as actually drawing the text goes, yes, using an
>
NSAffineTransform, or some of the convenient coordinate transformation
>
methods in NSView would be the best way to draw the text vertically.
>
Naturally, you'd implement this in a subclass of NSTableHeaderCell.
>
>
Configuring the table might be a bit of a trick. The reason is that
>
the table view you drag into a window in IB is actually a fairly
>
complex hierarchy with several different views. The outermost view is
>
a scroll view that contains four subviews: a clip view that contains
>
the actual table view, an NSScroller, another clip view that contains
>
the NSTableHeaderView, and the corner view. To change the height of
>
the header, you actually need to change the height of the clip view
>
that encloses it, along with keeping the corner view the same height.
>
And, of course, you need to keep the other clip view and the scroller
>
aligned correctly so that they all fit in the scroll view. I'll leave
>
the coding of it up to the reader, as it would basically be a bunch of
>
pain in the butt calculations and setFrame: calls.
_______________________________________________
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.