C# Class NanoByte.Common.Controls.DropDownButton

A Button with an additional drop-down menu.
Inheritance: System.Windows.Forms.Button
ファイルを表示 Open project: nano-byte/common

Private Properties

Property Type Description
AlignInRectangle System.Drawing.Rectangle
CalculateButtonAutoSize System.Drawing.Size
CalculateButtonTextAndImageLayout void
DropDownMenuStrip_Closing void
DropDownMenuStrip_Opening void
DropDownMenu_Popup void
GetHorizontalAlignment HorizontalAlignment
GetVerticalAlignment VerticalAlignment
LayoutTextAboveOrBelowImage void
LayoutTextBeforeOrAfterImage void
OverlayObjectRect System.Drawing.Rectangle
PaintArrow void
PaintTextAndImage void
SetButtonDrawState void
WndProc void

Public Methods

Method Description
DropDownButton ( ) : System
GetPreferredSize ( Size proposedSize ) : Size
ShowDropDownMenu ( ) : void

Protected Methods

Method Description
IsInputKey ( Keys keyData ) : bool
OnEnabledChanged ( EventArgs e ) : void
OnGotFocus ( EventArgs e ) : void
OnKeyDown ( KeyEventArgs kevent ) : void
OnKeyUp ( KeyEventArgs kevent ) : void
OnLostFocus ( EventArgs e ) : void
OnMouseDown ( MouseEventArgs e ) : void
OnMouseEnter ( EventArgs e ) : void
OnMouseLeave ( EventArgs e ) : void
OnMouseUp ( MouseEventArgs mevent ) : void
OnPaint ( PaintEventArgs pevent ) : void

Private Methods

Method Description
AlignInRectangle ( Rectangle outer, Size inner, System.Drawing.ContentAlignment align ) : Rectangle
CalculateButtonAutoSize ( ) : Size
CalculateButtonTextAndImageLayout ( Rectangle &contentRect, Rectangle &textRectangle, Rectangle &imageRectangle ) : void
DropDownMenuStrip_Closing ( object sender, System.Windows.Forms.ToolStripDropDownClosingEventArgs e ) : void
DropDownMenuStrip_Opening ( object sender, CancelEventArgs e ) : void
DropDownMenu_Popup ( object sender, EventArgs e ) : void
GetHorizontalAlignment ( System.Drawing.ContentAlignment align ) : HorizontalAlignment
GetVerticalAlignment ( System.Drawing.ContentAlignment align ) : VerticalAlignment
LayoutTextAboveOrBelowImage ( Rectangle totalArea, bool textFirst, Size textSize, Size imageSize, Rectangle &textRect, Rectangle &imageRect ) : void
LayoutTextBeforeOrAfterImage ( Rectangle totalArea, bool textFirst, Size textSize, Size imageSize, Rectangle &textRect, Rectangle &imageRect ) : void
OverlayObjectRect ( Rectangle &container, Size &sizeOfObject, System.Drawing.ContentAlignment alignment ) : Rectangle
PaintArrow ( Graphics g, Rectangle dropDownRect ) : void
PaintTextAndImage ( Graphics g, Rectangle bounds ) : void
SetButtonDrawState ( ) : void
WndProc ( Message &m ) : void

Method Details

DropDownButton() public method

public DropDownButton ( ) : System
return System

GetPreferredSize() public method

public GetPreferredSize ( Size proposedSize ) : Size
proposedSize System.Drawing.Size
return System.Drawing.Size

IsInputKey() protected method

protected IsInputKey ( Keys keyData ) : bool
keyData Keys
return bool

OnEnabledChanged() protected method

protected OnEnabledChanged ( EventArgs e ) : void
e System.EventArgs
return void

OnGotFocus() protected method

protected OnGotFocus ( EventArgs e ) : void
e System.EventArgs
return void

OnKeyDown() protected method

protected OnKeyDown ( KeyEventArgs kevent ) : void
kevent System.Windows.Forms.KeyEventArgs
return void

OnKeyUp() protected method

protected OnKeyUp ( KeyEventArgs kevent ) : void
kevent System.Windows.Forms.KeyEventArgs
return void

OnLostFocus() protected method

protected OnLostFocus ( EventArgs e ) : void
e System.EventArgs
return void

OnMouseDown() protected method

protected OnMouseDown ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnMouseEnter() protected method

protected OnMouseEnter ( EventArgs e ) : void
e System.EventArgs
return void

OnMouseLeave() protected method

protected OnMouseLeave ( EventArgs e ) : void
e System.EventArgs
return void

OnMouseUp() protected method

protected OnMouseUp ( MouseEventArgs mevent ) : void
mevent MouseEventArgs
return void

OnPaint() protected method

protected OnPaint ( PaintEventArgs pevent ) : void
pevent PaintEventArgs
return void

ShowDropDownMenu() public method

public ShowDropDownMenu ( ) : void
return void