• 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
Refreshing subviews
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Refreshing subviews


  • Subject: Refreshing subviews
  • From: Lorenzo <email@hidden>
  • Date: Wed, 05 May 2004 16:48:26 +0200

Hi,
I put some subviews within a main view.
When the user clicks on one of the subviews or the main view, I select the
mainview and show a blue frame along its borders. The problem is that when
the subview is large as the main view I don't see the blue border anymore.

In the main view I wrote:
-------------------------
-(void)drawRect:(NSRect)rect
{
[[self superview] setNeedsDisplay:YES];
[super drawRect:rect];

if(isSelected){
[[NSColor blueColor] set];
NSFrameRectWithWidth(NSInsetRect(rect, 2, 2), 2);
}
}

If I enlarge the rect of NSFrameRectWithWidth, I never see the blue border.
If I insect the rect of NSFrameRectWithWidth, when the subview image is
large as the main view I don't see the blue border anymore.
If I put [super drawRect:rect] after NSFrameRectWithWidth, nothing changes.
Do you know how to solve this problem?


Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
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: Refreshing subviews
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: Dealing with non-standard character sets
  • Next by Date: Re: Custom canRemove binding
  • Previous by thread: Re: Dealing with non-standard character sets
  • Next by thread: Re: Refreshing subviews
  • Index(es):
    • Date
    • Thread