• 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
Re: Hiding Controls
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Follow-Ups:
    • Re: Hiding Controls
      • From: Chris Allum <email@hidden>
References: 
 >Re: Hiding Controls (From: David Remahl <email@hidden>)

  • Prev by Date: Re: NSTableView and Ellipses--Again
  • Next by Date: Re: MOKit
  • Previous by thread: Re: Hiding Controls
  • Next by thread: Re: Hiding Controls
  • Index(es):
    • Date
    • Thread