Re: NSTableView in code
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