• 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: restoring the stored scroll position of an NSTableView and it's NSTableHeaderView.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: restoring the stored scroll position of an NSTableView and it's NSTableHeaderView.


  • Subject: Re: restoring the stored scroll position of an NSTableView and it's NSTableHeaderView.
  • From: Lon Giese <email@hidden>
  • Date: Wed, 17 May 2006 18:53:36 -0700

I do something very similar in my app, except I'm not scrolling horizontally only vertically... I added in a horizontal offset and you're right the header did not scroll horizontally... Which is not surprising... the components of a table view only seem to talk to each other when you click on a scroller... and that "Machinery" as it says in the docs is apple's secret... or at least its not in the docs I'm looking at

according to the docs, reflectScrolledClipView only adjusts the scrollers and nothing else... Also according to the docs apple does not want anyone working directly with the clipview unless you're not using the clip view with a scroll view... which you are

I don't see any other way to do it. there are no methods in scroll view to scroll the view. I ended up doing what you're doing...

As a suggestion (don't know this will work) you might try setting the bounds of the NSTableHeaderView (NSView) to scroll the header over yourself... Thats probably how the table view does it when using the "machinery".


On May 17, 2006, at 12:58 PM, Kenneth Clark wrote:

I have an SNTableView that I need to set to a stored scroll position. The existing code is :

// Scroll Position
theObj = [inDict objectForKey:kSnapshotScrollPosition];
if (theObj)
{
NSPoint thePoint;
sscanf([theObj UTF8String], "%f %f", &thePoint.x, &thePoint.y);
[[[self enclosingScrollView] contentView] scrollToPoint:thePoint];
[[self enclosingScrollView] reflectScrolledClipView:[[self enclosingScrollView] contentView]];
}


The main view of the table works fine, but the NSTableHeaderView doesn't scroll to the right place.

1) Is this the right way to reset the scroll position of an NSTableView?
2) If it is, how do I get the Header view to sync with the table scrolled position?



Thanks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


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
References: 
 >restoring the stored scroll position of an NSTableView and it's NSTableHeaderView. (From: Kenneth Clark <email@hidden>)

  • Prev by Date: CoreData vs. SQLite for Multi-User Simultaneous Access
  • Next by Date: Re: returning value in a function argument
  • Previous by thread: restoring the stored scroll position of an NSTableView and it's NSTableHeaderView.
  • Next by thread: what's an easy way to use NSBrowser?
  • Index(es):
    • Date
    • Thread