Re: Bug in NSImageView?
Re: Bug in NSImageView?
- Subject: Re: Bug in NSImageView?
- From: Daniel Todd Currie <email@hidden>
- Date: Fri, 23 Jul 2004 13:50:40 -0700
That did it, thanks for the tip.
On 2004 Jul 20, at 23:16, Louis C. Sacha wrote:
Hello...
The problem you are having is probably due to the fact that the
palletized NSImageView in InterfaceBuilder (along with most of the
various types of controls and views that normally don't have subviews)
is set to not autoresize its subviews.
In the awakeFromNib method of your controller or whatever object is in
charge of the nib containing the NSImageView, you need to turn that
feature back on.
[generatorListView setAutoresizesSubviews:TRUE];
The funny thing is, the default setting for autoresizesSubviews is
TRUE when you create an NSImageView instance programmatically by
doing alloc & initWithFrame: (or by setting the custom class in the
inspector for a NSView "Custom View" placeholder in InterfaceBuilder,
which is basically the same as creating it programmatically). It's
just the palletized versions of some views in IB that have
autoresizesSubviews turned off by default (although they tend to be
view types that don't normally have subviews).
Hope that helps,
Louis
Before filing a bug report, I thought I'd fly this one by you folks...
I am programmatically adding custom view instances to my window like
so:
...
As I add more views, the views that I have previously added should
stick to the top of the generatorListView, and the new one placed at
the bottom of generatorListView. This works fine when
generatorListView is a "Custom View" from the IB Palette.
However, I would also like a background color in the
generatorListView, so I set it to an NSImageView and everything is
ruined. My subviews no longer stick to the top of the
generatorListView, so they all pile on top of each other at the
bottom. The ONLY thing I changed was the class of generatorListView
in IB from a "Custom View" to an "Image View".
Shouldn't the NSImageView behave the same way as the NSView?
-- DTC
_______________________________________________
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.