开发者

How to scale axes independently at runtime on an NSButton

In Interface Builder, you can select how you want a button's image to be scaled, choosing either Axes Independent, Proportionally开发者_如何学Python Down, etc. for the "Scaling" drop-down. How can I access or change this attribute of the NSButton at runtime?


You should be able to set that by using the button’s cell:

NSButton *someButton;

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

For the list of image scaling options, see here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜