• 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: Corbin Dunn <email@hidden>
  • Date: Wed, 12 Sep 2012 14:41:20 -0700

On Sep 10, 2012, at 6:08 PM, Alfian Busyro <email@hidden> wrote:

> Kyle, thanks for your solution.
>> 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?
> So I planning to make two tables in one view but I don't want to separate that two tables with scroll,
> and make only the view (parent view of two tables) is scrollable.

Just leave it in a scrollview, and set it to not scroll in any direction, and size the scrollview to the table's height/width. That's it.

> The purpose is if user scroll down that parent view these two tables also have to be scroll down too.
> Like sectional table view but with multiple tables, because I don't want to make it sectional.
>> 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.
> it seems pretty annoying.

That table has to control its frameSize; there is no way around this if you think about it.

corbin


>
> -- Alfian
>
> On 12/09/10 16:35, Kyle Sluder wrote:
>> 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


_______________________________________________

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>)
 >Re: nstableview without nsscrollview (From: Kyle Sluder <email@hidden>)
 >Re: nstableview without nsscrollview (From: Alfian Busyro <email@hidden>)

  • Prev by Date: Re: Getting local IP of Wi-Fi device
  • Next by Date: Just wondering about Modal Panels
  • Previous by thread: Re: nstableview without nsscrollview
  • Next by thread: Re: nstableview without nsscrollview
  • Index(es):
    • Date
    • Thread