• 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
Newbie Question on centering an NSScrollView's documentView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie Question on centering an NSScrollView's documentView


  • Subject: Newbie Question on centering an NSScrollView's documentView
  • From: Yojimbo <email@hidden>
  • Date: Mon, 24 Feb 2003 19:48:59 -0800

Hi there,

I know this has to be something really basic, but I'm hoping someone can tell me why calling [[self documentView] setFrameOrigin:<some point>]; inside an NSScrollView's drawRect method doesn't work as expected? I've also tried updating the view with [[self documentView] setDisplayIsNeeded:YES];, but didn't have any luck. In addition it seems to be drawing an obscene number of artifacts so I know I'm missing something.

If you're curious, I've posted a simple example project at:
http://homepage.mac.com/yojimbo/.cv/yojimbo/Public/ CenteredScrollView.sit-link.sit

While I'm at it, can anyone tell me exactly which view I need to "flip" so that it uses a top-left coordinate space when being resized? Each of the views I've tried so far (the NSScrollView subclass, the NSView subclass, and the NSClipView subclass) either end up drawing nothing or cause a crash. I know it has to be something I'm doing wrong, but if anyone can point me in the right direction I'd be grateful.

Any help would be appreciated.

Thanks,
Jim
_______________________________________________
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: Re: vtables in objc++
  • Next by Date: SimpleVideoOut problems...
  • Previous by thread: Different Menu View?!
  • Next by thread: SimpleVideoOut problems...
  • Index(es):
    • Date
    • Thread