• 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
NSTableView in code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTableView in code


  • Subject: NSTableView in code
  • From: email@hidden
  • Date: Mon, 22 Nov 2004 11:19:47 -0500

Is it possible to add an NSTableView to a NSWindow in code? Im doing this here:

// contentframe  = get content frame from a windows content view
// content = nswindows content view

NSTableView*	view = [[NSTableView alloc] initWithFrame:contentframe];
[view setAutoresizingMask:( NSViewWidthSizable | NSViewHeightSizable )];
[content addSubview:view];

NSTableColumn*	col = [[NSTableColumn alloc] initWithIdentifier:window];
[[col headerCell] setStringValue:@"Hello"];
[col setWidth:200];

[view addTableColumn:col];

When i do it like this, i get nothing in the window. If i remove the column adding code, i get my view filled with white. Any idea whats wrong?

thanks

Alex

_______________________________________________
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


  • Follow-Ups:
    • Re: NSTableView in code
      • From: 陳銘崧 a.k.a. James Chen <email@hidden>
  • Prev by Date: What to do if Apple doesn't answer to support incident?
  • Next by Date: Again: Using mouseEntered and mouseExited
  • Previous by thread: Re: What to do if Apple doesn't answer to support incident?
  • Next by thread: Re: NSTableView in code
  • Index(es):
    • Date
    • Thread