• 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
Help with a NSScrollView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with a NSScrollView


  • Subject: Help with a NSScrollView
  • From: James Housley <email@hidden>
  • Date: Mon, 28 Mar 2005 17:18:12 -0500

I have a NSBox with a bunch of controls and other stuff in it, but just a box and a button will work for this example. When the button is pressed the box's height either increases or decreases by 100. The height is, while the width changes to match the width of the scrollView.

I have sub-classed NSScrollView and overridden tile: so that the box is always placed in the top left corner of the scrollView.

Now when a NSTextView is resized to be smaller, the content that is in the top left corner stays in the top left corner. With my scrollView the contents of the bottom left seems to be anchored. I would like to keep the top left anchored.

I have looked at drawRect:, but that has the new size so I can't correct it there.

Do I need to create my own clipView as a subclass of NSClipView?

Do I need to create a fully custom scrollView from scratch?

Googling hasn't turned up much useful.  Has anyone done this already?

Jim

--
/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
 X  - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
email@hidden      http://www.FreeBSD.org     The Power to Serve
email@hidden  http://www.TheHousleys.net
---------------------------------------------------------------------
Progress (n) : What led from smart users in front of dumb terminals to
dumb users in front of smart terminals.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

 _______________________________________________
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

  • Prev by Date: Re: Debugging problems
  • Next by Date: Re: Debugging problems
  • Previous by thread: CFRunLoopRun()
  • Next by thread: How do I get a file panel like NSDocument for my Export and Import items?
  • Index(es):
    • Date
    • Thread