Scaling images in NSButtonCell
Scaling images in NSButtonCell
- Subject: Scaling images in NSButtonCell
- From: Jens Baumeister <email@hidden>
- Date: Thu, 7 Jun 2001 19:54:41 +0200
Hi,
I have an NSMatrix with NSButtonCells. I create these cells dynamically at
runtime and assign them NSImages as labels.
The only problem I have is that I can't figure out a way to properly scale
the NSImage down to the NSButtonCell's size. I tried something like
[buttonImage setScalesWhenResized:YES];
[buttonImage setSize:[buttonMatrix cellSize]];
but it didn't work correctly. :(
I think I've gone through all the methods for NSButtonCell's and NSImage's
ancestors, yet I can't figure out a nice way to do this. I probably could
use the cellSize or some other NSSize to roll my own scaling, but before I
implement it myself I want to be absolutely sure that I'm not missing any
existing method(s) that would save me from that hassle.
_____________________________________
Jens Baumeister
Bullex GmbH, Cologne, Germany
She sells c-shells by the sea shore.