Re: Table View Headers Programatically
Re: Table View Headers Programatically
- Subject: Re: Table View Headers Programatically
- From: Clark Mueller <email@hidden>
- Date: Wed, 22 Jan 2003 21:48:44 -0700
Sounds like work, to me. :) I will go about doing that then. The
setHeaderView: and setCornerView: methods do not do this. They are in
the hodgepodge of things that I'm working with currently, but they
don't want to work, so I will try your method.
Thanks,
Clark
On Wednesday, January 22, 2003, at 09:33 PM, Brian Webster wrote:
On Wednesday, January 22, 2003, at 08:14 PM,
email@hidden wrote:
Is there a way to programatically set the flag for "display column
headers" on a table view/outline view? I haven't been able to figure
out how to duplicate this. I'm laying out the view programatically
(doing it with IB is not an option, for the circumstances I'm dealing
with), and thus need to know how to do everything programatically, but
this is tripping me up...
If you wanted to set up a table view like the one from the IB palette,
with column headers showing, I think you would actually need to
explicitly set up an NSTableView (inside an NSScrollView) along with
an NSTableHeaderView and a corner view, since those two auxiliary
views aren't actually subviews of the table view, but rather the
scroll view. I believe if you just do an [[NSTableView alloc]
initWithFrame:frame] and stick it in a scroll view, it won't have a
header view by default. If you wanted to be able to toggle this at
runtime, I'm not sure if just calling setHeaderView: and
setCornerView: would be smart enough to insert the new views correctly
in the hierarchy, or if you'd have to wedge it in there yourself.
--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
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.
_______________________________________________
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.