Re: How can I hide an NSView properly?
Re: How can I hide an NSView properly?
- Subject: Re: How can I hide an NSView properly?
- From: email@hidden
- Date: Thu, 28 Feb 2002 11:45:22 -0800
This will probably work, but I think this fails when the
superview is resized when the indicator is hidden. So this
method will probably mean that I have to give up on a resizable
window (or do a lot of calculation).
Replace your indicator with an empty view which will track the
resizing for you. Or, put an empty NSView between the indicator
and the background (might be not too easy to do in IB). This,
you can show your indicator always in the same place relative to
the intermediate view.
Right. Another way is to add your hidden views just before their
superview resizes, and remove them just after. You would probably need
the superview to be a custom subclass of NSView, and override -setFrame:
to do something like:
- (void)setFrame:(NSRect)frame
{
[self addSubview:myHiddenSubview];
[super setFrame:frame];
[myHiddenSubview removeFromSuperview];
}
I think this would probably work nicely, but I haven't tried it.
Might be easier than messing around with NSBox, might not be.
I haven't been able to find hide/unhide methods for views (or
even controls). Am I overlooking something?
Aqua guidelines tell you to avoid hiding parts of the user
interface. An progress indicator is on the border where minds
differ. Compare the chasing arrows in Mail.app with them of
OmniWeb.app
Right. Note you can click on Mail's chasing arrows even when they're
hidden, bringing up the activity viewer. Some might find this UI
questionable. :->
Ben Haller
Stick Software
_______________________________________________
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.