Charlie Egan
Charlie Egan

Reputation: 5153

Change Button Border Properties on IBAction

Why does this allow me to change the bordered state but not the border width (or other border properties)?

NSButton *button = (NSButton *)sender;
[button setBordered:false];
[button setBorderWidth:5]; 

Upvotes: 0

Views: 854

Answers (1)

Anne
Anne

Reputation: 27073

The setBorderWidth: method does not exists, check the NSButton Class Reference.
In other words, NSButton does not support changing the border width (by default).
The setBordered: method defines wether the button has a bezeled border.
Setting setBordered: to false removes the complete bezel, for example:

With Bezel Without Bezel

The setBordered: method might be confusing therefor.

Upvotes: 1

Related Questions