C# Class SILUBS.SharedScrControls.LabelButton

Implements a simple button-like control derived from the panel control. For the applications where I use this control, I was using a button control, but that was giving me some undesired focus problems when the button was the child of other non-form controls.
Inheritance: System.Windows.Forms.Label
Mostrar archivo Open project: sillsdev/FieldWorks

Public Methods

Method Description
LabelButton ( ) : System

Constructs a PanelButton

Protected Methods

Method Description
GetBackColorShade ( PaintState state ) : Color

GetBackColorShade ( PaintState state, Color normalBack ) : Color

OnMouseDown ( MouseEventArgs e ) : void

Set's the button's state and invalidates it to force redrawing.

OnMouseEnter ( EventArgs e ) : void

OnMouseLeave ( EventArgs e ) : void

OnMouseMove ( MouseEventArgs e ) : void

OnMouseUp ( MouseEventArgs e ) : void

Set's the button's state and invalidates it to force redrawing.

OnPaint ( PaintEventArgs e ) : void

OnPaintImage ( PaintEventArgs e ) : void

Paints the image on the buttons.

OnPaintText ( PaintEventArgs e ) : void

Paints the Text on the buttons.

Private Methods

Method Description
DeterminePaintState ( ) : void

MouseInBounds ( int x, int y ) : bool

OnPaintBackground ( PaintEventArgs e ) : void
SetTextAlignment ( ) : void

Method Details

GetBackColorShade() protected method

protected GetBackColorShade ( PaintState state ) : Color
state PaintState
return Color

GetBackColorShade() protected method

protected GetBackColorShade ( PaintState state, Color normalBack ) : Color
state PaintState
normalBack Color
return Color

LabelButton() public method

Constructs a PanelButton
public LabelButton ( ) : System
return System

OnMouseDown() protected method

Set's the button's state and invalidates it to force redrawing.
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

OnMouseMove() protected method

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

OnMouseUp() protected method

Set's the button's state and invalidates it to force redrawing.
protected OnMouseUp ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnPaint() protected method

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

OnPaintImage() protected method

Paints the image on the buttons.
protected OnPaintImage ( PaintEventArgs e ) : void
e PaintEventArgs
return void

OnPaintText() protected method

Paints the Text on the buttons.
protected OnPaintText ( PaintEventArgs e ) : void
e PaintEventArgs
return void