System.Windows.Forms.ToolStripDropDownItem.ShowDropDown C# (CSharp) Method

ShowDropDown() public method

public ShowDropDown ( ) : void
return void
		public void ShowDropDown ()
		{
			// Don't go through this whole deal if
			// the DropDown is already visible
			if (this.DropDown.Visible)
				return;
				
			// Call this before the HasDropDownItems check to give
			// users a chance to handle it and add drop down items
			this.OnDropDownShow (EventArgs.Empty);
			
			if (!this.HasDropDownItems)
				return;
			
			this.Invalidate ();
			this.DropDown.Show (this.DropDownLocation);
		}
		#endregion

Usage Example

Example #1
0
        public override void DoDefaultAction()
        {
            ToolStripDropDownItem item = Owner as ToolStripDropDownItem;

            if (item != null && item.HasDropDownItems)
            {
                item.ShowDropDown();
            }
            else
            {
                base.DoDefaultAction();
            }
        }
All Usage Examples Of System.Windows.Forms.ToolStripDropDownItem::ShowDropDown