• 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: Autoscroll NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Autoscroll NSTableView


  • Subject: Re: Autoscroll NSTableView
  • From: Thomas Willson <email@hidden>
  • Date: Wed, 26 Aug 2009 15:43:21 -0700

I have a related question; I wanted to figure out if the text view was scrolled to the bottom. I found this in the archives:

Compare the -visibleRect to the -bounds of the text view.  If the
visible rect is at the end of the bounds, the user can see the end.
Otherwise the user can not.

Being a newish cocoa developer, I need slightly more detail in the explanation. How do you compare the two? I am assuming I can't simply check if they are equal.


On Aug 26, 2009, at 2:59 PM, PCWiz wrote:

Thanks, that code worked perfectly.

On 2009-08-26, at 3:26 PM, Corbin Dunn wrote:


On Aug 26, 2009, at 2:17 PM, PCWiz wrote:

How do I make it so that an NSTableView automatically scrolls to the bottom as new rows are added to it?

There is no automatic way; you have to add code to do it. You should probably only do it if the prior row was scrolled to the bottom.


[tableView scrollRowToVisible:[tableView numberOfRows] - 1];

--corbin

_______________________________________________

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


References: 
 >Autoscroll NSTableView (From: PCWiz <email@hidden>)
 >Re: Autoscroll NSTableView (From: Corbin Dunn <email@hidden>)
 >Re: Autoscroll NSTableView (From: PCWiz <email@hidden>)

  • Prev by Date: Question regarding parsing files and NSTask
  • Next by Date: Re: NSTableView drag from Finder Problem
  • Previous by thread: Re: Autoscroll NSTableView
  • Next by thread: Making failed NSAsserts crash an app
  • Index(es):
    • Date
    • Thread