I wonder if I can add a custom right-click menu to the toolbar of this
I don’t think so, at least not with lot hacking.
What are you trying to do?
I want to be able to customize a menu through the plug-in interface. After selecting an smartpart, right-click can display 'coypy the attribute value ’ in the right-click menu, and then Paste on another choose smadt part. Although the script can also be implemented, I hope to be able to right-click in the menu that appears. Quick to use, but I don’t want to use the SelectTool plug-in. I want to add it to the first selection menu in the toolbar…
Why do you need to right click on the toolbar?
There is a API for general context menu access in the works. But it is not ready, yet.