Re: NSScrollView how to scroll to top
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.