Setting the Appearance of a Button’s Border
You can control what your button’s border looks like by changing its shape and shading. Note that the border doesn’t appear if isBordered
returns NO
. Use setBordered:
to change its value.
To change the border’s shape, change the button’s bezel type with setBezelStyle:
. There are two major categories of bezel type.
If your button is identified mainly by text, use
NSRoundedBezelStyle
. It uses the appropriate bezel style for a text button, which is a rounded rectangle, like this:If your button is identified mainly by an icon, use
NSRegularSquareBezelStyle
,NSThickSquareBezelStyle
, orNSThickerSquareBezelStyle
. These types use a rectangular button with a border. The small style has a 2-pixel border; the medium style, 3-pixel; the large style, 4-pixel. The three types are shown here:
Copyright © 2014 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2014-10-16