Re: auto-sizing NSTableView
Re: auto-sizing NSTableView
- Subject: Re: auto-sizing NSTableView
- From: Austin Sarner <email@hidden>
- Date: Sat, 22 Jan 2005 23:53:46 -0500
You can get the width out of the frame.
NSRect myRect;
myRect = [mainWindow frame]; // insert the frame of the longest cell
here
NSLog(@"%d",myRect.size.width);
Hope this helps
On Jan 22, 2005, at 11:26 PM, chris struhar wrote:
How can I make an NSTableView resize so that the whole view is the
size of the widest row? I have 2 columns in the NSTableView, the first
is small and fixed width, the second is variable width, and the
NSWindow is a transparent window. I would like to resize the
NSTableView and NSWindow so that they are the width of the widest
entry in the table, but I can't find any methods in the cocoa
documentation about how to find the widest entry. I looked through
NSScrollView, NSTableView, NSView, etc. and found several methods to
return the frame but none that return the actual used width.
Anyone know how I can do this?
Thanks,
Chris Struhar
_______________________________________________
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