To hide menu items and submenu items at run time, set the Visible property of the menu items to false.
To hide the first menu programmatically
CType(Me.C1WebMenu1.Items(0), C1WebMenuItem).Visible = False
· C#
((C1WebMenuItem)this.C1WebMenu1.Items[0]).Visible = false;
· Delphi
((C1WebMenuItem)Self.C1WebMenu1.Items[0]).Visible := false;
To hide the second menu item of the first menu programmatically
CType(CType(Me.C1WebMenu1.Items(0), C1WebMenuItem).SubMenu.Items(1), C1WebMenuItem).Visible = False
· C#
((C1WebMenuItem)this.C1WebMenu1.Items[0].Submenu.Items[1]).Visible = false;
· Delphi
((C1WebMenuItem)Self.C1WebMenu1.Items[0].Submenu.Items[1]).Visible := false;
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |