• 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: How do I change the default scrolling behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I change the default scrolling behavior


  • Subject: Re: How do I change the default scrolling behavior
  • From: Matt Neuburg <email@hidden>
  • Date: Mon, 6 May 2002 09:57:48 -0700

On Tue, 30 Apr 2002 11:16:09 -0700, Timothy Standing <email@hidden> said:

> I have a custom NSView inside a NSScrollView in my applications
>main window. The NSScrollView is set so it resizes whenever the
>window is resized, but my custom view does not.
>
> I want to make it so that when the user changes the window size,
>the point in my custom view which was at the top left corner of the
>NSScrollView does not change

It's your NSView, and it's your DrawRect routine. It's your job to have
that routine do what you want. Just have it draw the contents of the view
so that they are located where you want them located.

The routine can look at the size of the NSScrollView to help make this
decision. If you register the NSView to get an
NSViewFrameDidChangeNotification you can make adjustments every time a
resize takes place. m.
--

matt neuburg, phd = email@hidden, http://www.tidbits.com/matt
pantes gar anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/
_______________________________________________
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.

  • Prev by Date: Resolution independent NSImage
  • Next by Date: Re: [sort of OT] PackageMaker help
  • Previous by thread: Resolution independent NSImage
  • Next by thread: Re: [sort of OT] PackageMaker help
  • Index(es):
    • Date
    • Thread