I don't believe it is possible to do this programmatically using public API. I'm marking this as correct. If I'm mistaken feel free to reply and I'll take off the green check.
Topic:
UI Frameworks
SubTopic:
AppKit
Tags: