Re: Hiding Controls
Re: Hiding Controls
- Subject: Re: Hiding Controls
- From: Andy Lee <email@hidden>
- Date: Fri, 1 Mar 2002 00:41:07 -0500
At 9:27 PM -0800 2/28/02, John Pattenden wrote:
>
is there a method to hide controls in dialog boxes? I have text fields and checkboxes that I want to hide sometimes.. I looked in NSControl but didn't see a show/hide or visible method.
This came up recently. Here's how two people replied:
>
Cc: email@hidden, email@hidden
>
Subject: Re: How can I hide an NSView properly?
>
From: Graeme Hiebert <email@hidden>
>
To: Gerben Wierda <email@hidden>
>
Date: Thu, 28 Feb 2002 07:50:11 -0800
>
[...]
>
There are no hide/show methods on views. It is simply not supported this easily, largely because it is considered bad design, and there are other ways around it.
>
>
If you want your view to continue to resize after it has been removed from the superview, put another view (such as an invisible NSBox) between your view and your superview. Remove your view from the NSBox and retain it somewhere. The box will resize as the window shape changes, and you can resize your view to the box's frame before inserting it back.
- - - - -
At 5:22 PM +0100 2/28/02, Markus Hitter wrote:
>
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.
--Andy
_______________________________________________
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.