Beispiel #1
0
        /// <summary>
        /// Removes the menu located at the specified
        /// index from this menu bar. </summary>
        /// <param name="index">   the position of the menu to be removed. </param>
        /// <seealso cref=          java.awt.MenuBar#add(java.awt.Menu) </seealso>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: public void remove(final int index)
        public virtual void Remove(int index)
        {
            lock (TreeLock)
            {
                Menu m = GetMenu(index);
                Menus.RemoveAt(index);
                MenuBarPeer peer = (MenuBarPeer)this.Peer_Renamed;
                if (peer != null)
                {
                    m.RemoveNotify();
                    m.Parent_Renamed = null;
                    peer.DelMenu(index);
                }
                if (HelpMenu_Renamed == m)
                {
                    HelpMenu_Renamed = null;
                    m.IsHelpMenu     = false;
                }
            }
        }