cocoa - NSView | NSTextField Right Click issue -


i have nsview , inside that, there label : nstextfield control, inside nsview have show context menu on right click, working fine except few below issue,

at place didn't work, i.e. if right click , doesn't open context menu, further realized have kept length/width of label big , right click happening on label, since empty area, par user experience, should allow open context menu, feel following 2 approaches solve problem

1 -- check width/length of nstextfield runtime set proper width,

2 -- pass mouse event ( or at-least right-click )from nstextfield( label ) parentview,

can suggest me, how can achieve ?

kind regards

rohan

i'm not sure if helps when click right mouse button on nstextfield in interface builder you'll see "menu" object. connecting nsmenu , have default context menu.


Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -