How to remove NSMenuItem gap above custom view
Asked Answered
P

1

0

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 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

Preteritive answered 9/7, 2011 at 9:7 Comment(4)
Please post your question as a question, and then post the answer separately and accept it is described in the FAQ, rather than posting the answer in the question body and pseudotagging the title as [Solved].Eudosia
Thanks for the tip, will keep this in mind.Preteritive
I suggest carrying it out with this question, otherwise it'll likely be closed.Eudosia
I can't give my own answer right now, as i have to wait for next 7-8 hours. Till, i have am keeping it like that.You can edit the post, if it will help to keep the post open. Anyway,this post is only to help other like me not for calculating votes. :). Thanks for your concern.Preteritive
P
0

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

Thanks

Preteritive answered 11/7, 2011 at 1:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.