• 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: Adding/removing rectangles from an NSImageView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding/removing rectangles from an NSImageView


  • Subject: Re: Adding/removing rectangles from an NSImageView
  • From: James Chen <email@hidden>
  • Date: Thu, 12 Feb 2004 09:49:13 +0800

Hi,
These are something might help.
On Feb 12, 2004, at 4:55 AM, Rob In der Maur wrote:
Relevant code from the -endPageViewSheet:

for (i = 0; i < [[pageViewImageView subviews] count]; i++) {
RectangleView *rectView = [[pageViewImageView subviews] objectAtIndex:i];
[rectView removeFromSuperviewWithoutNeedingDisplay];
// tried [rectView removeFromSuperView] without effect
[pageViewImageView setNeedsDisplayInRect:[rectView bounds]];
line above changed to ==> [pageViewImageView setNeedsDisplayInRect:[rectView frame]];
Because the parameter rectangle should be in pageViewImageView's coordinate.
}
If this doesn't work, I guess the sheet didn't get a chance to redraw itself before you close it.
So maybe you should force the sheet to draw by sending -display to pageViewImageView before you close it.
Hope these help,
James
------------------------------------
Ulead Systems Inc.
James Chen
Software Engineer
Image Div.
------------------------------------
_______________________________________________
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.
  • Follow-Ups:
    • Re: Adding/removing rectangles from an NSImageView
      • From: Rob In der Maur <email@hidden>
References: 
 >Adding/removing rectangles from an NSImageView (From: Rob In der Maur <email@hidden>)

  • Prev by Date: Re: Very very simple applescript..... hmmm.
  • Next by Date: Custom control class question
  • Previous by thread: Adding/removing rectangles from an NSImageView
  • Next by thread: Re: Adding/removing rectangles from an NSImageView
  • Index(es):
    • Date
    • Thread