12-26-2016, 03:54 PM
I have a toolbar. I make it appear by using a hotkey.
How can I make this toolbar disappear after clicking anywhere, including the toolbar itself?
Solution 1: I can add a command to close it, preceding every other command in this toolbar, but I have hundreds of commands in this toolbar, so it would be a long work to add this command to all other commands, one by one.
Second solution: I can create a function that closes this toolbar after detecting any left click, but this function does not work when I click inside the toolbar.
Any other solutions?
How can I make this toolbar disappear after clicking anywhere, including the toolbar itself?
Solution 1: I can add a command to close it, preceding every other command in this toolbar, but I have hundreds of commands in this toolbar, so it would be a long work to add this command to all other commands, one by one.
Second solution: I can create a function that closes this toolbar after detecting any left click, but this function does not work when I click inside the toolbar.
Any other solutions?