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

A column in a DataGridView that consists of FwTextBoxCells.
Inheritance: System.Windows.Forms.DataGridViewColumn
Mostra file Open project: sillsdev/FieldWorks Class Usage Examples

Protected Properties

Property Type Description
m_cache SIL.FieldWorks.FDO.FdoCache
m_fontCache Font>.Dictionary
m_textBoxControl SIL.FieldWorks.Common.Widgets.FwTextBoxControl
m_ws int

Private Properties

Property Type Description
FwTextBoxColumn System
GetValuesFont System.Drawing.Font
GetWritingSystem IWritingSystem
GetWritingSystemHandle int
GetWritingSystemHandleWithFallback int
OnColumnWidthChanged void
OnSortCompare void
SetZoomFactor void

Public Methods

Method Description
FwTextBoxColumn ( ) : System

Initializes a new instance of the FwTextBoxColumn class.

Used by Designer

FwTextBoxColumn ( SIL.FieldWorks.FDO.FdoCache cache, bool rowsAreMultiLing ) : System

Initializes a new instance of the FwTextBoxColumn class.

GetDefaultNewRowValue ( int rowIndex ) : ITsString

Gets the default value for a cell in the row for new records.

InitializeTextBoxControl ( FwTextBox fwTxtBox, ITsString tss, int rowIndex ) : void

Initializes the text box control.

SetCellStyleAlignment ( int ws, System.Windows.Forms.DataGridViewCellStyle style ) : void

Modifies the alignment of the specified cell style based on the specified writing system's RTL value.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

HandleCellFormatting ( object sender, System.Windows.Forms.DataGridViewCellFormattingEventArgs e ) : void

Make sure the cell get's its font from it's ITsString's ITextProps when m_useTextPropsFontForCell is true.

OnDataGridViewChanged ( ) : void

Called when the band is associated with a different .

OnRowHeightChanged ( object sender, System.Windows.Forms.DataGridViewRowEventArgs e ) : void

Called when a row in the grid changes heights. Make sure to adjust the FwTextBoxControls, if it's showing in the resized row in this column.

Private Methods

Method Description
FwTextBoxColumn ( SIL.FieldWorks.FDO.FdoCache cache ) : System
GetValuesFont ( ITsString tss, int ws ) : Font

Get the font for the specified TsString and writing system.

GetWritingSystem ( int rowIndex ) : IWritingSystem

Gets the writing system.

GetWritingSystemHandle ( int rowIndex ) : int

Gets the writing system.

GetWritingSystemHandleWithFallback ( int rowIndex ) : int

Gets the writing system handle for the column. If that is 0 (i.e., not specified), attempt to get the writing system from the specified DataGridView row.

OnColumnWidthChanged ( object sender, System.Windows.Forms.DataGridViewColumnEventArgs e ) : void

Called when the column width changed.

OnSortCompare ( object sender, System.Windows.Forms.DataGridViewSortCompareEventArgs e ) : void

Occurs when the DataGridView compares two cell values to perform a sort operation.

SetZoomFactor ( float factor ) : void

Method Details

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool set to true if called from the Dispose() method, /// set to false if called by GC. If this parameter is false we shouldn't /// access any managed objects since these might already have been destroyed.
return void

FwTextBoxColumn() public method

Initializes a new instance of the FwTextBoxColumn class.
Used by Designer
public FwTextBoxColumn ( ) : System
return System

FwTextBoxColumn() public method

Initializes a new instance of the FwTextBoxColumn class.
public FwTextBoxColumn ( SIL.FieldWorks.FDO.FdoCache cache, bool rowsAreMultiLing ) : System
cache SIL.FieldWorks.FDO.FdoCache
rowsAreMultiLing bool
return System

GetDefaultNewRowValue() public method

Gets the default value for a cell in the row for new records.
public GetDefaultNewRowValue ( int rowIndex ) : ITsString
rowIndex int
return ITsString

HandleCellFormatting() protected method

Make sure the cell get's its font from it's ITsString's ITextProps when m_useTextPropsFontForCell is true.
protected HandleCellFormatting ( object sender, System.Windows.Forms.DataGridViewCellFormattingEventArgs e ) : void
sender object
e System.Windows.Forms.DataGridViewCellFormattingEventArgs
return void

InitializeTextBoxControl() public method

Initializes the text box control.
public InitializeTextBoxControl ( FwTextBox fwTxtBox, ITsString tss, int rowIndex ) : void
fwTxtBox FwTextBox The FwTextBox control to initialize. When this is null, then /// the column's internal FwTextBox (i.e. m_textBoxControl) is initialized.
tss ITsString The TsString fwTxtBox is initialized to.
rowIndex int Row whose writing system is used (and whose default value /// is used when necessary).
return void

OnDataGridViewChanged() protected method

Called when the band is associated with a different .
protected OnDataGridViewChanged ( ) : void
return void

OnRowHeightChanged() protected method

Called when a row in the grid changes heights. Make sure to adjust the FwTextBoxControls, if it's showing in the resized row in this column.
protected OnRowHeightChanged ( object sender, System.Windows.Forms.DataGridViewRowEventArgs e ) : void
sender object
e System.Windows.Forms.DataGridViewRowEventArgs
return void

SetCellStyleAlignment() public method

Modifies the alignment of the specified cell style based on the specified writing system's RTL value.
public SetCellStyleAlignment ( int ws, System.Windows.Forms.DataGridViewCellStyle style ) : void
ws int
style System.Windows.Forms.DataGridViewCellStyle
return void

Property Details

m_cache protected_oe property

protected FdoCache,SIL.FieldWorks.FDO m_cache
return SIL.FieldWorks.FDO.FdoCache

m_fontCache protected_oe property

protected Dictionary m_fontCache
return Font>.Dictionary

m_textBoxControl protected_oe property

protected FwTextBoxControl,SIL.FieldWorks.Common.Widgets m_textBoxControl
return SIL.FieldWorks.Common.Widgets.FwTextBoxControl

m_ws protected_oe property

protected int m_ws
return int