System.Windows.Forms.ToolStrip.Dismiss C# (CSharp) Method

Dismiss() private method

private Dismiss ( ) : void
return void
		internal virtual void Dismiss ()
		{
			this.Dismiss (ToolStripDropDownCloseReason.AppClicked);
		}

Same methods

ToolStrip::Dismiss ( ToolStripDropDownCloseReason reason ) : void

Usage Example

Example #1
0
        protected override void OnClick(EventArgs e)
        {
            if (!this.Enabled)
            {
                return;
            }

            if (this.HasDropDownItems)
            {
                base.OnClick(e);
                return;
            }

            if (this.OwnerItem is ToolStripDropDownItem)
            {
                (this.OwnerItem as ToolStripDropDownItem).OnDropDownItemClicked(new ToolStripItemClickedEventArgs(this));
            }

            if (this.IsOnDropDown)
            {
                ToolStrip ts = this.GetTopLevelToolStrip();

                if (ts != null)
                {
                    ts.Dismiss(ToolStripDropDownCloseReason.ItemClicked);
                }
            }

            if (this.IsMdiWindowListEntry)
            {
                this.mdi_client_form.MdiParent.MdiContainer.ActivateChild(this.mdi_client_form);
                return;
            }

            if (this.check_on_click)
            {
                this.Checked = !this.Checked;
            }

            base.OnClick(e);

            if (!this.IsOnDropDown && !this.HasDropDownItems)
            {
                ToolStrip ts = this.GetTopLevelToolStrip();

                if (ts != null)
                {
                    ts.Dismiss(ToolStripDropDownCloseReason.ItemClicked);
                }
            }
        }
All Usage Examples Of System.Windows.Forms.ToolStrip::Dismiss