• 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
Re: Table View Headers Programatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Table View Headers Programatically


  • Subject: Re: Table View Headers Programatically
  • From: Clark Mueller <email@hidden>
  • Date: Wed, 22 Jan 2003 23:40:29 -0700

First, in response to Mr. Hedrick, that does show me some things, but not what I'm looking for. I need to have an example that doesn't use IB at all, more than anything.

As for arranging things into an NSScrollView with the header view and so forth, I haven't gotten very far, but it *looks* to me like the column headers are part of the NSTableColumn; unfortunately, I haven't figured out how to make them be shown. I can't tell exactly whether IB then is splitting up and nesting the header cell inside the table column, or if something else is going on, but I'm pushing ahead slowly with it. I certainly welcome more suggestions! Perhaps if there's someone on the IB team at Apple willing to tell me how IB does this. That is *precisely* the behaviour I seek to mimic, actually. In a very different context, but my desire is to construct a table view from the appropriate components, and then have it be draggable in a view. I can deal with the draggable in a view part, but I haven't figured out how to properly construct the table yet.

Thanks for the suggestions - keep 'em coming,

Clark Mueller
email@hidden

On Wednesday, January 22, 2003, at 09:48 PM, Clark Mueller wrote:

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

References: 
 >Re: Table View Headers Programatically (From: Clark Mueller <email@hidden>)

  • Prev by Date: Subclassing question
  • Next by Date: Re: Cocoa Code Repository
  • Previous by thread: Re: Table View Headers Programatically
  • Next by thread: Re: Table View Headers Programatically
  • Index(es):
    • Date
    • Thread