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

Re: NSTableView in code


  • Subject: Re: NSTableView in code
  • From: 陳銘崧 a.k.a. James Chen <email@hidden>
  • Date: Tue, 23 Nov 2004 09:52:27 +0800

Hi,
I did a little experiment and then I find out NSTableView works better with NSScrollView
I did the things just like you mentioned. Yes, the table disappear.
But after I put the table within a NSScrollView, everything comes back.
I can't figure out why that is.
Hope someone could point me out.
James
------------------------------------
Ulead Systems Inc.
James Chen
Software Engineer
Image Div.
------------------------------------
On Nov 23, 2004, at 12:19 AM, email@hidden wrote:


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


_______________________________________________ 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: Frank Midgley <email@hidden>
References: 
 >NSTableView in code (From: email@hidden)

  • Prev by Date: NSTableView delegate not responding
  • Next by Date: Re: Cocoa program to Activate/Deactivate Screensaver
  • Previous by thread: NSTableView in code
  • Next by thread: Re: NSTableView in code
  • Index(es):
    • Date
    • Thread