Question

I have a Check Box on a tool bar, (NSToolbar) as in the image below. It's action gets called and the sender.state toggles with each push, but on the tool bar the box never gets checked.

So the expected behaviour in terms of toggling, and the Action being called are all as you'd expect, it's just that the check box never redraws with the box checked.

I have tried setting sender.setNeedsDisplay=YES in the action, but that made no difference.

All the other controls on the tool bar work as expected.

Any ideas? enter image description here

Was it helpful?

Solution

Try embedding the checkbox in a NSBox which you configure to be borderless and transparent. worked for me --- button type should be checkbox

OTHER TIPS

Try embedding the checkbox in a NSBox which you configure to be borderless and transparent. As sadly so often for NSToolbarItems, this strategy works.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top