objective c - Separator item in NSPopupButton with bindings -
the contents of nspopupbutton
bound nsarray
of strings.
how can insert separator item via bindings?
the "-
" strings (like in olden/classic days) doesn't work, i.e. shows literally "-
" menu item.
is there out-of-the-box solution standard cocoa classes , bindings?
this should trivial problem can't find solution problem doesn't involve silly hacks subclassing nsmenu
, nspopupbutton
or other non-intuitive work arounds.
take @ documentation nscontentplacementtagbindingoption
, added in mac os x 10.5. in interface builder's bindings inspector, available elements such pop-up menu buttons; go "value selection" section , in content category (content, content objects, content values), "content placement tag". field value should number matches menu item's tag number.
the contents of bound array inserted menu in place of whichever item has indicated tag value. in case, static menu contain separator item , @ to the lowest degree 1 other item specify array values go.
objective-c cocoa cocoa-bindings appkit nspopupbutton
No comments:
Post a Comment