Disable bar items in Windows Forms PopupMenu
- This feature is not applicable for ListBarItem and StaticBarItem.
- In this illustration we have used BarItem. Similarly, we have to set for ParentBarItem, DropDownBarItem,ComboBoxBarItem, ListBarItem, StaticBarItem and TextBoxBarItem.
We can disable the unused or unsupported bar items by using this feature. BarItems are enabled by default when they are created, but this can be changed based on user requirement through the
The below code snippet will explain how to disable the BarItems.
this.barItem1.Enabled = false; this.barItem4.Enabled = false;
Me.barItem1.Enabled = False Me.barItem4.Enabled = False