开发者

How to remove NSMenuItem gap above custom view

开发者 https://www.devze.com 2023-03-18 05:40 出处:网络
I was looking for something discussed in following posts. Gap above NSMenuItem custom view. Reverse engineering an NSMenu for a Status Bar Item

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

精彩评论

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