• 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: window resizing events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: window resizing events


  • Subject: Re: window resizing events
  • From: "David Piasecki" <email@hidden>
  • Date: Thu, 13 May 2004 15:05:28 -0700

Turns out you need to resize the superview in addition to the NSView
object. So the docs show the following being required...

SView *theView; /* Assume this exists. */
NSRect newFrame; /* Assume this exists. */

[[theView superview] setNeedsDisplayInRect:[theView frame]];
[theView setFrame:newFrame];
[theView setNeedsDisplay:YES];

My code is a bit different, but also works...

NSSize size; /* Assume this exists */

[theView setFrameSize:size]
[[theView superview] setNeedsDisplay:true];
[theView setNeedsDisplay;true];

David



On May 13, 2004, at 12:03 PM, David Piasecki wrote:

> Actually, it appears that regular images have the same problem. I was
> trying to resize the image, then I tried resizing the frame, then the
> image and the frame. Each scenario seems to be exhibiting the same
> problem, cutting off the image or causing it to disappear, though
> sometimes it works. Perhaps resizing is causing the origin of the
> frame to change as well. Anyway, if anyone has any ideas, I'd be happy
> to hear 'em.
>
> Thanks,
> David
_______________________________________________
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.


References: 
 >Re: window resizing events (From: "David Piasecki" <email@hidden>)

  • Prev by Date: How to make NSImageView respond to keyboard events?
  • Next by Date: Re: Passing a path with spaces inside
  • Previous by thread: Re: window resizing events
  • Next by thread: Re: setHidden: on MacOS 10.2
  • Index(es):
    • Date
    • Thread