Re: The best way to hide views.
Re: The best way to hide views.
- Subject: Re: The best way to hide views.
- From: "John C. Randolph" <email@hidden>
- Date: Thu, 20 Mar 2003 19:31:29 -0800
On Thursday, March 20, 2003, at 07:09 PM, Francisco Tolmasky wrote:
I am wondering what the best way to hide views is. I currently need an
NSSplitView to not display itself, but am finding it quite difficult.
I tried to have a _isVisible member variable and then rewrite display
to only display if _isVisible was set to true:
- (void)display
{
if(_isVisible) [super display];
}
But this does not work since NSSplitView does not call display, nor
displayRect, nor all the other displays nor drawRect! I am finding it
quite difficult to hide this view.
Does anybody have any good ideas that do not involve moving it outside
the viewing area of the window? (the view is being
repositioned/resized as its hidden so the move away solution would not
be the best).
The canonical way to do this is to remove the view in question from the
view hierarchy. You might also look into putting your splitview inside
a tabview that has its tabs hidden.
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
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.