Re: Images in a Table
Re: Images in a Table
- Subject: Re: Images in a Table
- From: Brian Webster <email@hidden>
- Date: Thu, 25 Oct 2001 12:23:33 -0500
On Thursday, October 25, 2001, at 09:34 AM, cocoa-dev-
email@hidden wrote:
How would I go about filling a table with images from a pre-determined
folder. Similar to the Desktop PrefPane of the 'System Preference'.
I believe the desktop pref pane uses an NSMatrix filled with
NSImageCells (or a subclass thereof). In IB, drag an image well
into your window. Set its border, attributes, etc. to the way
you want. Then select it and option-drag one of the handles.
This will make the single image well into an NSMatrix of
multiple images as it grows. As far as code goes, if the number
of images is dynamic, -renewRows:columns: and -sizeToCells will
be two handy NSMatrix methods to use.
--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster