Answer the question
In order to leave comments, you need to log in
How to add NSButton button to NSTokenField?
I want to add a button in my application in the NSTokenField field, for example, something like this:
That is, in NSTokenField there is a plus sign button that should perform some action, for example, a pop-up menu with a choice of tokens that can be added to the NSTokenField field.
I created a button programmatically and added it to NSTokenField:
NSButton *button = ];
[button setButtonType:NSMomentaryPushInButton];
[button setBezelStyle:NSSmallSquareBezelStyle];
[button setTarget:self];
[button setAction:@selector(action:)];
[formatTokenField addSubview:button];
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question