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

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.


  • Follow-Ups:
    • Re: Scaling images in NSButtonCell
      • From: Andrew Platzer <email@hidden>
  • Prev by Date: Summary of drawing routines?
  • Next by Date: Re: Summary of drawing routines?
  • Previous by thread: Re: Summary of drawing routines?
  • Next by thread: Re: Scaling images in NSButtonCell
  • Index(es):
    • Date
    • Thread