Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

HideCommands Hides Additional Commands/Groups/Tabs

Good evening,

I have been implementing security into our new SRP Ribbon based MDI frame and I have been hiding buttons if a user doesn't have access to them.

We have about 150 to 200 items/buttons in the ribbon for our application spread out over about 8 tabs.

On a test user account, there are 83 items the user does not have access to. When I use the DisableCommands method, it works great and disables those 83 items correctly. I want to hide the items though, but when I use the HideCommands method it hides almost all the buttons on the ribbon. It even hides several complete tabs that should still have unhidden commands on them.

Here are the lines of code to either hide or disable commands.

Send_Message(@Window:".OLE_RIBBON", "OLE.HideCommands", Command_Hide_List)
Send_Message(@Window:".OLE_RIBBON", "OLE.DisableCommands", Command_Hide_List)

I use either one or the other. And the variable Command_Hide_List is an @FM delimited list of commands that I want to hide/disable.

Any thoughts on why these two methods are acting upon different buttons on the ribbon control despite being passed the same list of commands?

Thank you!

Comments

  • This is a tough one to answer. Looking at my code, nothing stands out, but there are layers of code beneath my own (this is a 3rd party control) that might be at play. Would you be willing to email us a copy of the XML you use to set up the ribbon. It would give me something to immediately test with.
  • Kevin, I emailed you a copy of the XML. Let me know if there is any other information that would helpful for you to debug.

    Thank you!
  • Hello, Kevin, I just wanted to check to see if you have looked at the issue mentioned in this thread. By any chance were you able to duplicate it on your side? Thanks for any info or updates you can offer. Much appreciated!
  • I let this fall off my radar, so thanks for the reminder. I'll take a look today and tomorrow.
  • Great! Thank you, Kevin!
Sign In or Register to comment.