In a message dated Sat, 7 Dec 2002, Sherm Pendley writes: > On Saturday, December 7, 2002, at 04:19 PM, Trey Harris wrote: > > > Can someone tell me how to hide views? That is, in IB, I create all the > > elements of my interface, but some of them I want to not be displayed > > when > > the app starts and I want to display them later. This seems like it > > should be an easy problem to solve. > > It seems like it should be, yes. The problem is, Apple's Human Interface > Guidelines advise against it, and in order to encourage adherence to the > HIG, they've apparently made it more difficult than it should be. :-( > > I assume that you're using one of the label variants of an NSTextField, > perhaps as a status display or something similar. This is one of many > cases where it's hiding a view until it's needed is, regardless of what > Apple says, a perfectly valid need. Fortunately, for this particular > case anyway, there's an easy workaround. :-)
Yep, exactly, and thanks. But as for following the HIG, what is the recommendation? I've not had time to read them fully. I know that many of Apple's own apps resize themselves when a new element comes into or goes out of view (for instance, when customizing toolbars or switching panels is System Preferences)--is this the suggestion? So, my status bar should not exist until something needs to be displayed to it, and at that point, the window should lengthen to accomodate the NSTextField? And while I'm on the subject, how do you make dynamic interfaces like these, where elements of the interface move around and windows change size in response to user behavior? You can't do it directly in IB, so do you eschew IB entirely and go back to non-visual interface building, or is there some compromise? Trey
