Re: nstableview without nsscrollview
Re: nstableview without nsscrollview
- Subject: Re: nstableview without nsscrollview
- From: Kyle Sluder <email@hidden>
- Date: Mon, 10 Sep 2012 00:35:55 -0700
On Sun, Sep 9, 2012, at 11:17 PM, Alfian Busyro wrote:
> I'm thinking to have an un-scrollable nstableview in mac-osx app.
> because I don't want user to scroll within the table, but have to
Think very hard about this. Why would you want to do this? What would
you do if your table view gained enough data that it no longer fit in
the available space?
>
> Is it possible to have a table view without scroll view, or maybe to
> extract table view from scroll view ?
Yes, table views can live outside of a scroll view, but it's not a
simple task. -[NSTableView tile] loves to resize the table view to
snugly fit its contents, and -tile will be called at arbitrary times.
You can't call -setFrameSize: on a table view and expect it to stick. (I
believe I've filed a Radar asking for this ability; if I haven't, I
really should.)
If the table view's superview is an instance of NSClipView, it will
resize itself to be at least as big as its superview. So you might
consider putting the table view inside a naked NSClipView.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden