Re: Hiding Controls
Re: Hiding Controls
- Subject: Re: Hiding Controls
- From: Ondra Cada <email@hidden>
- Date: Sun, 11 Aug 2002 15:19:10 +0200
On Sunday, August 11, 2002, at 11:51 , David Remahl wrote:
For example, I have a progress indicator which I would like to hide when
it is complete, and show when I need it show progress again. A bit like
the spinning arrows in Mail.
It might be argued that the proper usage is shown in OmniWeb, where they
just stand still (and do not "magically" appear and disappear).
The fact that there is no way to hide a view in Cocoa is a consious design
desission. The NeXT engineers hosted the GUI idea that hiding things from
the user was a bad thing to do.
Therefore, you will have to temporarily remove the view from its
superview,
and reinsert it when you want it displayed again. Don't forget to retain
the
view before removing it from its superview.
Also, you have to be careful when the window happens to be resized. All
the hassle might teach you not to hide controls, after all ;)
(Note: for controls which don't respond to user actions and which don't
ever become the First Responder it might prove easier just to move them
off-window (setting eg. their x-origin to 100000) than actually removing
the view.)
---
Ondra Hada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.