Hey guys, I was wondering if there was a way to hide menu items configured via the Clietn Event Scripts popup from certain people. I’d like to have a couple of development options up there that aren’t visible to everyone. Of course, I could do a check once they click on it, but I was wondering if I could do any more besides that.
If you dig around with the swing utilities, you can get ahold of the outermost window, and then find the menu attached to it. From there, you can manipulate it to have what you wish. Similar to creating any other popup menu, but with the Swing types. Run it from a client startup script.
Just confirmed this works very nicely. A bit of trial and error to find the right sequence of objects to go down from the top (using SwingUtilities.getRoot()) but I can definitely enable, disable, make visible or not visible any jmenu item.