• 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: Problem with NSView and subviews
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with NSView and subviews


  • Subject: Re: Problem with NSView and subviews
  • From: email@hidden
  • Date: Wed, 17 Aug 2005 09:27:04 -0400

On Aug 17, 2005, at 8:44 AM, email@hidden wrote:

Here is my problem : I have a subclassed NSView in a NSScrollView (whose size is
smaller than the NSScrollView in IB). When the user selects something to view in
a list, my view is resized so that it can show all the data, and I expect scroll
bars to activate when I resize to something bigger than the scroll view, but
they don't ! Actually, the data I'm drawing is just drawn smaller into the
view, and its size didn't change at all (I'm using setFrameSize). I also tried
using setBoundsSize but it doesn't work either. Any idea on this?



One thing you might could do, in the source of the subclassed NSView, is set the autoresizing mask so that the view doesn't grow or shrink with the frame.


[self setAutoresizingMask: NSViewNotSizable];

This will use the view's frame size to activate the scroll bars. This might also help with the setFrameSize: method, which you'll probably need to use to manually resize the view (as it now won't resize automatically). Depending on how you set it up, you'll probably need to somehow have it's subview's communicate the minimum size that they need to be displayed, and use setFrameSize: with that size on it's containing view.

Cameron

_______________________________________________
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: Problem with NSView and subviews
  • Next by Date: Re: CoreData to-many relationship, and "first row selected" issue
  • Previous by thread: Problem with NSView and subviews
  • Next by thread: NSTableView blurry contents
  • Index(es):
    • Date
    • Thread