• 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: Bug in NSImageView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in NSImageView?


  • Subject: Re: Bug in NSImageView?
  • From: "Louis C. Sacha" <email@hidden>
  • Date: Tue, 20 Jul 2004 23:16:19 -0700

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.


  • Follow-Ups:
    • Re: Bug in NSImageView?
      • From: Daniel Todd Currie <email@hidden>
References: 
 >Bug in NSImageView? (From: Daniel Todd Currie <email@hidden>)

  • Prev by Date: Re: From Carbon to Cocoa
  • Next by Date: Re: Sending image from separate thread back to AppController
  • Previous by thread: Bug in NSImageView?
  • Next by thread: Re: Bug in NSImageView?
  • Index(es):
    • Date
    • Thread