• 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: Scaling images in NSButtonCell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Scaling images in NSButtonCell (From: Jens Baumeister <email@hidden>)

  • Prev by Date: Re: Summary of drawing routines?
  • Next by Date: Re: "Tricks" of the "Trade"
  • Previous by thread: Scaling images in NSButtonCell
  • Next by thread: Re: "public header"
  • Index(es):
    • Date
    • Thread