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!
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
Thank you!