System.Windows.Forms.ToolStripSplitButton.OnMouseDown C# (CSharp) Method

OnMouseDown() protected method

protected OnMouseDown ( MouseEventArgs e ) : void
e MouseEventArgs
return void
		protected override void OnMouseDown (MouseEventArgs e)
		{
			if (this.ButtonBounds.Contains (e.Location))
			{
				this.button_pressed = true;
				this.Invalidate ();
				base.OnMouseDown (e);
			}
			else if (this.DropDownButtonBounds.Contains (e.Location))
			{
				if (this.DropDown.Visible)
					this.HideDropDown (ToolStripDropDownCloseReason.ItemClicked);
				else
					this.ShowDropDown ();
			
				this.Invalidate ();
				base.OnMouseDown (e);
			}
		}