C# Class ZForge.Controls.XPTable.Editors.ColorCellEditor

A class for editing Cells that contain Colors
Inheritance: DropDownCellEditor
显示文件 Open project: zhuangyy/Motion Class Usage Examples

Private Properties

Property Type Description
colorpicker_SelectedColorChanged void

Public Methods

Method Description
CancelEditing ( ) : void

Stops editing the Cell and ignores any changes

ColorCellEditor ( ) : System

Initializes a new instance of the ColorCellEditor class with default settings

StartEditing ( ) : void

Starts editing the Cell

StopEditing ( ) : void

Stops editing the Cell and commits any changes

Protected Methods

Method Description
ColorToString ( Color color ) : string

Converts the specified Color to its string representation

OnKeyPress ( object sender, KeyPressEventArgs e ) : void

Handler for the editors TextBox.KeyPress event

OnLostFocus ( object sender, EventArgs e ) : void

Handler for the editors TextBox.LostFocus event

OnSelectedColorChanged ( EventArgs e ) : void

Raises the SelectedColorChanged event

SetCellValue ( ) : void

Sets the contents of the Cell being edited based on the value in the editor

SetEditLocation ( Rectangle cellRect ) : void

Sets the location and size of the CellEditor

SetEditValue ( ) : void

Sets the initial value of the editor based on the contents of the Cell being edited

ShouldStopEditing ( Control target, Point cursorPos ) : bool

Gets whether the editor should stop editing if a mouse click occurs outside of the DropDownContainer while it is dropped down

Private Methods

Method Description
colorpicker_SelectedColorChanged ( object sender, EventArgs e ) : void

Handler for the editors ColorPicker.SelectedColorChanged event

Method Details

CancelEditing() public method

Stops editing the Cell and ignores any changes
public CancelEditing ( ) : void
return void

ColorCellEditor() public method

Initializes a new instance of the ColorCellEditor class with default settings
public ColorCellEditor ( ) : System
return System

ColorToString() protected method

Converts the specified Color to its string representation
protected ColorToString ( Color color ) : string
color Color The Color to convert
return string

OnKeyPress() protected method

Handler for the editors TextBox.KeyPress event
protected OnKeyPress ( object sender, KeyPressEventArgs e ) : void
sender object The object that raised the event
e System.Windows.Forms.KeyPressEventArgs A KeyPressEventArgs that contains the event data
return void

OnLostFocus() protected method

Handler for the editors TextBox.LostFocus event
protected OnLostFocus ( object sender, EventArgs e ) : void
sender object The object that raised the event
e System.EventArgs An EventArgs that contains the event data
return void

OnSelectedColorChanged() protected method

Raises the SelectedColorChanged event
protected OnSelectedColorChanged ( EventArgs e ) : void
e System.EventArgs An EventArgs that contains the event data
return void

SetCellValue() protected method

Sets the contents of the Cell being edited based on the value in the editor
protected SetCellValue ( ) : void
return void

SetEditLocation() protected method

Sets the location and size of the CellEditor
protected SetEditLocation ( Rectangle cellRect ) : void
cellRect System.Drawing.Rectangle A Rectangle that represents the size and location /// of the Cell being edited
return void

SetEditValue() protected method

Sets the initial value of the editor based on the contents of the Cell being edited
protected SetEditValue ( ) : void
return void

ShouldStopEditing() protected method

Gets whether the editor should stop editing if a mouse click occurs outside of the DropDownContainer while it is dropped down
protected ShouldStopEditing ( Control target, Point cursorPos ) : bool
target System.Windows.Forms.Control The Control that will receive the message
cursorPos Point The current position of the mouse cursor
return bool

StartEditing() public method

Starts editing the Cell
public StartEditing ( ) : void
return void

StopEditing() public method

Stops editing the Cell and commits any changes
public StopEditing ( ) : void
return void