Setting the size of an Image in an NSTable

Hi again!

I’ve got images into my table - but I have no idea how to change their size? I’m guessing it’s to do with NSimage’s setSize… But I’ve no idea how to use the syntax with regard to image cells in a table…


You can set the size either in IB or in code. In IB, when you have the image cell of your table selected, in the attributes pane of the Inspector there is a field called “Scaling” which determines how your picture fits in the cell.

The same thing can be done in code by creating a property (e.g. myImageCell) and connecting it to the image cell in IB. You can then set the scaling with “myImageCell’s setImageScaling_(0)”. 0=scale proportionally, 1=ScaleToFit and 2=ScaleNone. If you need the pictures to be bigger, then you need to change either or both of the row height and column width in IB.