Is there a way to hide UX Items? I would like to hide some of the buttons in the Program Editor window.
Thank you!
Yes.
For example, hiding Halt statement
First method:
Edit your <Visual Components Folder>\VisualComponents.Engine.exe.config file
Find line …
<UxItem ItemId=“CreateHaltStatement” IconKey=“Statement/sHalt” ToolTipContentKey=“CreateHaltStatementTooltipContentTextId”></UxItem>
… and comment …
<!-- UxItem ItemId=“CreateHaltStatement” IconKey=“Statement/sHalt” ToolTipContentKey=“CreateHaltStatementTooltipContentTextId”></UxItem –>
… or delete them
Second method:
Put __init__.py file in directory %USERPROFILE%\Documents\<Visual Components Product>\<Version>\My Commands\HideCommands\ (create it if doesn’t exist)
from vcApplication import *
def OnAppInitialized():
removeMenuItem('CreateHaltStatement')
P.S.
- Replace <Visual Components Folder>, <Visual Components Product>, <Version> to appropriate values.
- See file VisualComponents.Engine.exe.config for names of commands.
- This method also works for buttons on ribbon panels
3 Likes