x4Trace Documentation v1.0
Loading...
Searching...
No Matches
IGraphics.Grid.ICell Class Reference

Represents a cell of grid. More...

Public Member Functions

 ICell (IGrid parent, ICellList cells, IColumn column, bool readOnly)
 Constructor.
 
virtual void SetCellData (ICellData cellData)
 Sets data of cell.
 
virtual void Draw (IGraphics.GInterface.IGraphics gr, int x, int y, bool isSelected, bool isFullRowSelect)
 Draws the cell. You have to increase the X value, with the width of the cell. You have to increase the Y value, with the height of the cell by row.
 
virtual void DrawRectangleTo (IGraphics.GInterface.IGraphics gr)
 Draws the merge.
 
virtual void DrawSelectedFrame (IGraphics.GInterface.IGraphics gr)
 Draws the selected frame.
 
virtual bool Contains (int x, int y)
 Returns true when the cell contains the coordinate.
 
virtual void SetMergedWH ()
 Counts the merge.
 
virtual void SetXY (int x, int y)
 Sets the X/Y coordinate of cell.
 
void EliminateMerge ()
 Deletes the merge.
 
virtual void SetRowHeightFromTextHeight ()
 Sets the height of row by height of maximum text of cells of row.
 
virtual void SetColumnWidthFromTextWidth ()
 Sets the width of column by width of maximum text of cells of row.
 
virtual int GetMergedWidth ()
 Returns the merged width of cell.
 
virtual int GetAbsoluteStartX ()
 Returns the absolute start X position.
 
Tuple< int, string > GetComboData ()
 Returns the data of datatag.
 
Tuple< string, string > GetComboStringData ()
 Returns the data of datatag.
 
virtual void SetAll (string text, GInterface.IFont font, IStringAlignment alignment)
 Sets all properties.
 
virtual void SetAll (string text, GInterface.IFont font, Align horizontalAlign, Align verticalAlign)
 Sets all properties.
 
virtual void SetAll (string text, GInterface.IFont font, Align horizontalAlign, Align verticalAlign, bool drawrectangle)
 Sets all properties.
 
virtual void SetAll (string text, GInterface.IFont font, IColor foreColor, Align horizontalAlign, Align verticalAlign)
 Sets all properties.
 
virtual void SetAll (string text, IGraphics.GInterface.IFont font, IColor foreColor, IColor backColor, Align horizontalAlign, Align verticalAlign)
 Sets all properties.
 

Protected Attributes

IGrid parent
 Parent.
 
IGraphics.GInterface.IColor backColor = IGraphics.GInterface.IColor.White
 Back color of cell.
 
IGraphics.GInterface.IColor lineColor = IGraphics.GInterface.IColor.Black
 Line color of cell.
 
IGraphics.GInterface.IColor foreColor = IGraphics.GInterface.IColor.Black
 Fore color of cell.
 
IGraphics.GInterface.IColor drawingRectangleToColor = IGraphics.GInterface.IColor.Black
 Merged rectangle line color.
 
IGraphics.GInterface.IFont font
 Font of cell.
 
IGraphics.GInterface.IStringAlignment stringFormat = new IGraphics.GInterface.IStringAlignment(IGraphics.GInterface.Align.Near, IGraphics.GInterface.Align.Near)
 Alignment of cell.
 
MergeType mergeType = MergeType.None
 Merge type of cell.
 
ICellList mergedCellList
 List of merged cells.
 
ICell drawingRectangleTo = null
 End of merging.
 
int drawingRectangleToLineWidth = 1
 Merge line width.
 
string text = ""
 Text of cell.
 
int x = 0
 X coordinate of cell.
 
int y = 0
 Y coordinate of cell.
 
IMargin margin = new IMargin(0, 0, 0, 0)
 Margin of cell.
 
int imageIndex = -1
 Image index of cell.
 
int imageWidth = 20
 Image width of cell.
 
int mergedWidth = 0
 Width of merge.
 
int mergedHeight = 0
 Height of merge.
 
bool readOnly = false
 The cell is readonly.
 
IGridControl control = null
 Parent control.
 
object tag = null
 Tag of cell.
 
object dataTag = null
 Data tag of cell.
 
ICellList cells = null
 Reference of row.
 
IColumn column = null
 Column of cell.
 
bool isDrawBorder = true
 Enable to draw border of cell.
 
object bmpBackGround
 Background image.
 

Properties

object BMPBackgound [get, set]
 Background image.
 
bool Drawrectangle [get, set]
 Enables to draw bolrder.
 
object Tag [get, set]
 Tag of cell.
 
object DataTag [get, set]
 Data tag of cell.
 
IColor BackColor [get, set]
 Back color of cell.
 
IColor LineColor [get, set]
 Line color of cell.
 
IColor ForeColor [get, set]
 Text color of cell.
 
bool ReadOnly [get, set]
 The cell is readonly.
 
GInterface.IFont Font [get, set]
 Font of cell.
 
IGraphics.GInterface.IStringAlignment StringFormat [get, set]
 Alignment of cell.
 
MergeType Merged [get, set]
 Merge type of cell.
 
string Text [get, set]
 Text of cell.
 
double GetTextToDouble [get]
 Double value of text. 0 when the text is not a number.
 
int GetTextToInt [get]
 Integer value of text. 0 when the text is not a number.
 
int Width [get]
 Width of column.
 
int FullWidth [get]
 Width of basic column + width of merge.
 
int Height [get]
 Height of row.
 
int FullHeight [get]
 Height of basic row + height of merge.
 
int WidthMerge [get]
 Width of merge.
 
int HeightMerged [get]
 Height of merge.
 
ICellList MergedCellList [get, set]
 List of merged cells.
 
int RowIndex [get]
 Index of row.
 
int ColumnIndex [get]
 Index of column.
 
int ImageIndex [get, set]
 Index of image.
 
IPoint Start [get]
 Start point.
 
IGridControl Control [get, set]
 Parent control.
 
int X [get, set]
 X position.
 
int Y [get, set]
 Y position.
 
bool AutoHeightCell [get]
 Cell sets the height automatically.
 
bool AutoWidthCell [get]
 Cell sets the width automatically.
 
ICell DrawingRectanleTo [get, set]
 End of merge.
 
int DrawingRectangleToLineWidth [get, set]
 Merge border width.
 
IColor DrawingRectangleToColor [get, set]
 Merge border color.
 
IMargin Margin [get, set]
 Margin of text.
 

Static Private Attributes

static object bmpForGraphics = new object()
 Helper object to draw.
 

Detailed Description

Represents a cell of grid.

Constructor & Destructor Documentation

◆ ICell()

IGraphics.Grid.ICell.ICell ( IGrid parent,
ICellList cells,
IColumn column,
bool readOnly )

Constructor.

Parameters
parentParent grid.
cellsThe row.
columnThe column.
readOnlyThe cell is readonly.

Member Function Documentation

◆ Contains()

virtual bool IGraphics.Grid.ICell.Contains ( int x,
int y )
virtual

Returns true when the cell contains the coordinate.

Parameters
xX coordinate.
yY coordinate.
Returns
True when conatains.

◆ Draw()

virtual void IGraphics.Grid.ICell.Draw ( IGraphics.GInterface.IGraphics gr,
int x,
int y,
bool isSelected,
bool isFullRowSelect )
virtual

Draws the cell. You have to increase the X value, with the width of the cell. You have to increase the Y value, with the height of the cell by row.

Parameters
grThe graphics.
xX coordinate.
yY coordinate.
isSelectedIs the cell selected.
isFullRowSelectIs the row selected.

◆ DrawRectangleTo()

virtual void IGraphics.Grid.ICell.DrawRectangleTo ( IGraphics.GInterface.IGraphics gr)
virtual

Draws the merge.

Parameters
grThe graphics.

◆ DrawSelectedFrame()

virtual void IGraphics.Grid.ICell.DrawSelectedFrame ( IGraphics.GInterface.IGraphics gr)
virtual

Draws the selected frame.

Parameters
grThe graphics.

◆ GetAbsoluteStartX()

virtual int IGraphics.Grid.ICell.GetAbsoluteStartX ( )
virtual

Returns the absolute start X position.

Returns

◆ GetComboData()

Tuple< int, string > IGraphics.Grid.ICell.GetComboData ( )

Returns the data of datatag.

Returns
ID, string.

◆ GetComboStringData()

Tuple< string, string > IGraphics.Grid.ICell.GetComboStringData ( )

Returns the data of datatag.

Returns
string, string

◆ GetMergedWidth()

virtual int IGraphics.Grid.ICell.GetMergedWidth ( )
virtual

Returns the merged width of cell.

Returns

◆ SetAll() [1/5]

virtual void IGraphics.Grid.ICell.SetAll ( string text,
GInterface.IFont font,
Align horizontalAlign,
Align verticalAlign )
virtual

Sets all properties.

Parameters
textText of cell.
fontFont of cell.
horizontalAlignHorizontal alignment.
verticalAlignVertical alignment.

◆ SetAll() [2/5]

virtual void IGraphics.Grid.ICell.SetAll ( string text,
GInterface.IFont font,
Align horizontalAlign,
Align verticalAlign,
bool drawrectangle )
virtual

Sets all properties.

Parameters
textText of cell.
fontFont of cell.
horizontalAlignHorizontal alignment.
verticalAlignVertical alignment.
drawrectangleEnables to draw border line.

◆ SetAll() [3/5]

virtual void IGraphics.Grid.ICell.SetAll ( string text,
GInterface.IFont font,
IColor foreColor,
Align horizontalAlign,
Align verticalAlign )
virtual

Sets all properties.

Parameters
textText of cell.
fontFont of cell.
foreColorColor of text.
horizontalAlignHorizontal alignment.
verticalAlignVertical alignment.

◆ SetAll() [4/5]

virtual void IGraphics.Grid.ICell.SetAll ( string text,
GInterface.IFont font,
IStringAlignment alignment )
virtual

Sets all properties.

Parameters
textText of cell.
fontFont of cell.
alignmentAlignment of cell.

◆ SetAll() [5/5]

virtual void IGraphics.Grid.ICell.SetAll ( string text,
IGraphics.GInterface.IFont font,
IColor foreColor,
IColor backColor,
Align horizontalAlign,
Align verticalAlign )
virtual

Sets all properties.

Parameters
textText of cell.
fontFont of cell.
foreColorColor of text.
backColorColor of background.
horizontalAlignHorizontal alignment.
verticalAlignVertical alignment.

◆ SetCellData()

virtual void IGraphics.Grid.ICell.SetCellData ( ICellData cellData)
virtual

Sets data of cell.

Parameters
cellDataCell data.

◆ SetXY()

virtual void IGraphics.Grid.ICell.SetXY ( int x,
int y )
virtual

Sets the X/Y coordinate of cell.

Parameters
xX coordinate.
yY coordinate.

The documentation for this class was generated from the following file: