FROM : Joshua Minor
DATE : Tue Apr 05 20:49:22 2005
I found that I had to set the autoresizing mask of the accessory's
superview also. It looks like there is one more level of nested views
in 10.3 than 10.2.
// grab the resize mask that was set in our nib
unsigned int mask = [accessory autoresizeMask];
// set the accessory view (this sets the resize mask to 0)
[sheet setAccessoryView:accessory];
// put our resize mask back
[accessory setAutoresizingMask:mask];
// apply the resize mask to the accessory's superview also
[[accessory superview] setAutoresizingMask:mask];
-joshm
Joshua Minor
Graphics Software Engineer
Pixar Animation Studios
> What happens if, after setAccessoryView:, you send
> setAutoresizingMask: to your view?
>
> -- F
>
> On 11 May 2004, at 4:22 PM, Eric Long wrote:
>
>
> I am using setAccessoryView for an NSOpenPanel. Everything seems to
> work
> properly with one caveat. I'd like my custom view to resize when the
> panel
> is resized, along with by view's subviews.
>
> The nib settings don't seem to be considered. The view always appears
> centered with a fixed size.
>
> Is there a way to bind the view's width to the panel's width?
>
>
> --
> Fritz Anderson
> Consulting Programmer
> http://resume.manoverboard.org/
DATE : Tue Apr 05 20:49:22 2005
I found that I had to set the autoresizing mask of the accessory's
superview also. It looks like there is one more level of nested views
in 10.3 than 10.2.
// grab the resize mask that was set in our nib
unsigned int mask = [accessory autoresizeMask];
// set the accessory view (this sets the resize mask to 0)
[sheet setAccessoryView:accessory];
// put our resize mask back
[accessory setAutoresizingMask:mask];
// apply the resize mask to the accessory's superview also
[[accessory superview] setAutoresizingMask:mask];
-joshm
Joshua Minor
Graphics Software Engineer
Pixar Animation Studios
> What happens if, after setAccessoryView:, you send
> setAutoresizingMask: to your view?
>
> -- F
>
> On 11 May 2004, at 4:22 PM, Eric Long wrote:
>
>
> I am using setAccessoryView for an NSOpenPanel. Everything seems to
> work
> properly with one caveat. I'd like my custom view to resize when the
> panel
> is resized, along with by view's subviews.
>
> The nib settings don't seem to be considered. The view always appears
> centered with a fixed size.
>
> Is there a way to bind the view's width to the panel's width?
>
>
> --
> Fritz Anderson
> Consulting Programmer
> http://resume.manoverboard.org/
| Related mails | Author | Date |
|---|---|---|
| No related mails found. | ||






Cocoa mail archive

