C# Class SIL.FieldWorks.Common.Widgets.SilButtonCell

Inheritance: System.Windows.Forms.DataGridViewTextBoxCell
Mostra file Open project: sillsdev/FieldWorks

Public Methods

Method Description
GetRectangles ( Rectangle bounds, Rectangle &rcbtn, Rectangle &rcText ) : void

Gets the rectangle for the radio button and the text, given the specified cell bounds.

GetRectangles ( Rectangle bounds, Rectangle &rcbtn, Rectangle &rcText, int rowIndex ) : void

Gets the rectangle for the radio button and the text, given the specified cell bounds.

IsPointOverButton ( Point pt, bool relativeToCell ) : bool

Gets a value indicating whether or not the specified point is over the cell's radio button. The relativeToCell flag is true when the specified point's origin is relative to the upper right corner of the cell. When false, it's assumed the point's origin is relative to the cell's owning grid control.

Protected Methods

Method Description
OnMouseClick ( System.Windows.Forms.DataGridViewCellMouseEventArgs e ) : void

OnMouseDown ( System.Windows.Forms.DataGridViewCellMouseEventArgs e ) : void

Monitor when the mouse button goes down over the button.

OnMouseLeave ( int rowIndex ) : void

OnMouseMove ( System.Windows.Forms.DataGridViewCellMouseEventArgs e ) : void

OnMouseUp ( System.Windows.Forms.DataGridViewCellMouseEventArgs e ) : void

Monitor when the user releases the mouse button.

Paint ( Graphics g, Rectangle clipBounds, Rectangle bounds, int rowIndex, DataGridViewElementStates state, object value, object formattedValue, string errorText, System.Windows.Forms.DataGridViewCellStyle style, System.Windows.Forms.DataGridViewAdvancedBorderStyle advancedBorderStyle, DataGridViewPaintParts parts ) : void

Paint the cell with a radio button and it's text.

Private Methods

Method Description
DrawButton ( Graphics g, Rectangle rcbtn, int rowIndex ) : void
DrawCellText ( Graphics g, string text, System.Windows.Forms.DataGridViewCellStyle style, Rectangle rcText ) : void

Draws the cell's text.

GetVisualStyleComboButton ( ) : System.Windows.Forms.VisualStyles.VisualStyleElement

Gets the correct visual style combo button given the state of the cell.

GetVisualStylePushButton ( ) : System.Windows.Forms.VisualStyles.VisualStyleElement

Gets the correct visual style push button given the state of the cell.

InternalShowButton ( int rowIndex ) : bool
ManageButtonToolTip ( ) : void

Method Details

GetRectangles() public method

Gets the rectangle for the radio button and the text, given the specified cell bounds.
public GetRectangles ( Rectangle bounds, Rectangle &rcbtn, Rectangle &rcText ) : void
bounds System.Drawing.Rectangle The rectangle of the entire cell.
rcbtn System.Drawing.Rectangle The returned rectangle for the button.
rcText System.Drawing.Rectangle The returned rectangle for the text.
return void

GetRectangles() public method

Gets the rectangle for the radio button and the text, given the specified cell bounds.
public GetRectangles ( Rectangle bounds, Rectangle &rcbtn, Rectangle &rcText, int rowIndex ) : void
bounds System.Drawing.Rectangle The rectangle of the entire cell.
rcbtn System.Drawing.Rectangle The returned rectangle for the button.
rcText System.Drawing.Rectangle The returned rectangle for the text.
rowIndex int The index of the row.
return void

IsPointOverButton() public method

Gets a value indicating whether or not the specified point is over the cell's radio button. The relativeToCell flag is true when the specified point's origin is relative to the upper right corner of the cell. When false, it's assumed the point's origin is relative to the cell's owning grid control.
public IsPointOverButton ( Point pt, bool relativeToCell ) : bool
pt Point
relativeToCell bool
return bool

OnMouseClick() protected method

protected OnMouseClick ( System.Windows.Forms.DataGridViewCellMouseEventArgs e ) : void
e System.Windows.Forms.DataGridViewCellMouseEventArgs
return void

OnMouseDown() protected method

Monitor when the mouse button goes down over the button.
protected OnMouseDown ( System.Windows.Forms.DataGridViewCellMouseEventArgs e ) : void
e System.Windows.Forms.DataGridViewCellMouseEventArgs
return void

OnMouseLeave() protected method

protected OnMouseLeave ( int rowIndex ) : void
rowIndex int
return void

OnMouseMove() protected method

protected OnMouseMove ( System.Windows.Forms.DataGridViewCellMouseEventArgs e ) : void
e System.Windows.Forms.DataGridViewCellMouseEventArgs
return void

OnMouseUp() protected method

Monitor when the user releases the mouse button.
protected OnMouseUp ( System.Windows.Forms.DataGridViewCellMouseEventArgs e ) : void
e System.Windows.Forms.DataGridViewCellMouseEventArgs
return void

Paint() protected method

Paint the cell with a radio button and it's text.
protected Paint ( Graphics g, Rectangle clipBounds, Rectangle bounds, int rowIndex, DataGridViewElementStates state, object value, object formattedValue, string errorText, System.Windows.Forms.DataGridViewCellStyle style, System.Windows.Forms.DataGridViewAdvancedBorderStyle advancedBorderStyle, DataGridViewPaintParts parts ) : void
g System.Drawing.Graphics
clipBounds System.Drawing.Rectangle
bounds System.Drawing.Rectangle
rowIndex int
state DataGridViewElementStates
value object
formattedValue object
errorText string
style System.Windows.Forms.DataGridViewCellStyle
advancedBorderStyle System.Windows.Forms.DataGridViewAdvancedBorderStyle
parts DataGridViewPaintParts
return void