NSSegmentedControl setFrame ignored ? (customizing NSSegmentedControl)

472 views Asked by At

I want to customize a NSSegmentedControl. The first thing I want to do is to change the height on the controller. In interface builder the height field for a NSSegmentedControl is disabled. So I simple try to change its height changing its frame in my code

[_scSeedChoice setFrame:NSMakeRect(_scSeedChoice.frame.origin.x, _scSeedChoice.frame.origin.y, _scSeedChoice.frame.size.width, 40)];

but nothing happened.

Does I missed something or its completly impossible to change the NSSegmentedControl.

If I cannot do it I wall implemented my own using 2 NSButton.

Thanks ... (for your future help).

1

There are 1 answers

0
Aditya Vaidyam On

Standard Aqua controls have a set height: title bars are 22px, buttons are (I believe) 17px, and the same goes for segmented controls. perhaps setting an image inside it might help.