开发者

How to remove NSMenuItem gap above custom view

I was looking for something discussed in following posts.

Gap above NSMenuItem custom view.

Reverse engineering an NSMenu for a Status Bar Item

I tried开发者_Go百科 the carbon code provided by Pierre Bernard

initially, i was getting same error "EXC_BAD_ACCESS on the line InstallControlEventHandler" like other had. I play with the code lots and accidently found the solution.

I have just replaced the InstallControlEventHandler function call to HIViewInstallEventHandler and everything is working fine.

Hope this will help others. Let me know if anyone need further clarification.

Special thanks to Pierre Bernard to provide great code.

Thanks


Just replace the InstallControlEventHandler function call to HIViewInstallEventHandler and code will work fine.

Thanks

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜