Refreshing subviews
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.