• 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 without nsscrollview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: nstableview without nsscrollview
      • From: Alfian Busyro <email@hidden>
References: 
 >nstableview without nsscrollview (From: Alfian Busyro <email@hidden>)

  • Prev by Date: nstableview without nsscrollview
  • Next by Date: NSTableView & setContentMaxSize:
  • Previous by thread: nstableview without nsscrollview
  • Next by thread: Re: nstableview without nsscrollview
  • Index(es):
    • Date
    • Thread