Re: Scaling images in NSButtonCell
Re: Scaling images in NSButtonCell
- Subject: Re: Scaling images in NSButtonCell
- From: Andrew Platzer <email@hidden>
- Date: Thu, 7 Jun 2001 13:01:38 -0700
On Thursday, June 7, 2001, at 10:54 , Jens Baumeister wrote:
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. :(
This may be a bug in 10.0 with setting image sizes smaller. Unfortunately,
there isn't an easy way to work around it. You might try drawing the
image into another image that is smaller using -[NSImage drawInRect:]
Andrew
__________________________________________________________________
A n d r e w P l a t z e r
A p p l i c a t i o n F r a m e w o r k s
A p p l e