How to scale axes independently at runtime on NSButton

In the Builder interface, you can choose how you want to scale the button image by selecting Axial Independent, Proportionally Down, etc. for the Scaling drop-down list. How can I access or change this NSButton attribute at runtime?

+4
source share
1 answer

You must set this using the button cell :

NSButton *someButton; NSButtonCell *someButtonCell = [someButton cell]; [someButtonCell setImageScaling:NSImageScaleAxesIndependently]; 

A list of image scaling options is here .

+10
source

All Articles