To hide a menu item you set the sharedprops.enabled = false. You can also make it invisible with sharedprops.visible = false. The trick is figuring out the name of the menu.
using the customization wizard add a toolclick event for the basetoolmanager and use a message box to give the name of the item clicked.
private void baseToolbarsManager_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs args)
{
MessageBox.Show(args.Tool.Key.ToString());
}
Save and relaunch.
Then click the menu item you want to disable and take note of the name.
Then put this in your load form event or other appropriate location. You may need to put it in other places if the standard screen enables and disables the item based on other criteria. For example you might put it in the before tool drop down event if the item is on the actions menu.
// depends on the release level if use of the "this." is appropriate.
this.baseToolbarsManager.Tools["PrintTool"].SharedProps.Enabled = false; // repalce "PrintTool" with the name gotten from the toolclick event.
Jim Kinneman
Senior Consultant
Encompass Solution, Inc
using the customization wizard add a toolclick event for the basetoolmanager and use a message box to give the name of the item clicked.
private void baseToolbarsManager_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs args)
{
MessageBox.Show(args.Tool.Key.ToString());
}
Save and relaunch.
Then click the menu item you want to disable and take note of the name.
Then put this in your load form event or other appropriate location. You may need to put it in other places if the standard screen enables and disables the item based on other criteria. For example you might put it in the before tool drop down event if the item is on the actions menu.
// depends on the release level if use of the "this." is appropriate.
this.baseToolbarsManager.Tools["PrintTool"].SharedProps.Enabled = false; // repalce "PrintTool" with the name gotten from the toolclick event.
Jim Kinneman
Senior Consultant
Encompass Solution, Inc
--- In vantage@yahoogroups.com, Ken Stoner <kest874@...> wrote:
>
> Is there any way then to hide the print button on the menu bar?
>
> Anyone have an example on how to call the packing slip print program?
>
>
> [Non-text portions of this message have been removed]
>