• 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: NSScrollView how to scroll to top
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSScrollView how to scroll to top


  • Subject: Re: NSScrollView how to scroll to top
  • From: Seth Willits <email@hidden>
  • Date: Sun, 28 Mar 2004 12:52:45 -0800

On Mar 28, 2004, at 12:09 PM, Bjoern Kriews wrote:

I have a NSScrollView, and when I load up my main window,

the scrollview always Scrolls to the bottom of the view, I would like to make
It so that the ScrollView starts at the top.

So how do I make the NSScrollView Scroll to the top automatically?

Look at the NSScrollView documentation (- contentView) this one returns a NSClipView,
then look at its scrollToPoint method.

Call this stuff in the awakeFromNib method of your controller.

I am not sure at the moment if you have to call NSScrollViews reflectScrolledClipView
method, I'd expect that NSClipView does this automatically.


Isn't it just easier to do this?

- (void)awakeFromNib
{
[[mScrollView verticalScroller] setFloatValue:1.0];
}




Seth Willits
------------------------------------------------------------------------ ---
President and Head Developer of Freak Software - http://www.freaksw.com
REALbasic Guru at ResExcellence - http://www.resexcellence.com/realbasic
Webmaster for REALbasic Game Central - http://www.freaksw.com/rbgames

Friendship is a beautiful thing. "The best and most beautiful things in the
world cannot be seen or even touched - they must be felt with the heart."
-- Hellen Keller
------------------------------------------------------------------------ ---
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: NSScrollView how to scroll to top
      • From: Matt Jaffa <email@hidden>
References: 
 >NSScrollView how to scroll to top (From: Matt Jaffa <email@hidden>)
 >Re: NSScrollView how to scroll to top (From: Bjoern Kriews <email@hidden>)

  • Prev by Date: Re: NSScrollView how to scroll to top
  • Next by Date: returning nil on initialization
  • Previous by thread: Re: NSScrollView how to scroll to top
  • Next by thread: Re: NSScrollView how to scroll to top
  • Index(es):
    • Date
    • Thread