SimpleGrid.Grid Class Reference

A simple no-nonsense grid component. More...

List of all members.

Public Member Functions

 Grid ()
 A simple no-nonsense grid component.
void setScrollBars ()
void setColumnWidth (int column, int width)
 Sets the width of a column.
int getColumnWidth (int column)
 Gets the width of a column.
void setAllColumnWidths (int width)
 Sets the width of all the columns.
void setRowHeaderEditable (int column, bool editable)
bool getRowHeaderEditable (int row)
void setHeaderEditable (int column, bool editable)
bool getHeaderEditable (int column)
void setHeader (int column, string header)
 Sets the header text of a column.
void setRowHeader (int row, string rowHeader)
 Sets the rowHeader text of some row.
string getHeader (int column)
 Gets the header text of a column.
string getRowHeader (int row)
 Gets the row header text of a column.
void setValue (int column, int row, float val)
 Sets the (float) value text of a cell.
void setValue (int column, int row, int val)
 Sets the (int) value text of a cell.
void setValue (int column, int row, string val)
 Sets the (text) value text of a cell.
float getValue (int column, int row)
 Gets the float value of a cell.
int getIntValue (int column, int row)
 Gets the int value of a cell.
string getText (int column, int row)
 Gets the text of a cell.
void setCellColor (int column, int row, Color color)
 Sets the cell back color.
Color getCellColor (int column, int row)
 Gets the cell back color.
int getMouseOverCol ()

Static Public Member Functions

static void handleDoubleKeyPress (TextBox box, System.Windows.Forms.KeyPressEventArgs e, bool isSigned)

Public Attributes

const int M_PAINT_ALL = 0
const int M_PAINT_NO_COLORS = 1
event EventHandler SelectedRowChanged
 Occurs when the user selects a row.
event GridChangedHandler CellChanged
event GridChangedHandler ColumnHeaderChanged
event GridChangedHandler RowHeaderChanged

Static Public Attributes

static int MODE_DOUBLE = 0
static int MODE_INT = 1
static int MODE_STRING = 2

Protected Member Functions

void paintBackground (Graphics g)
void paintHeaders (Graphics g)
void paintAllCells (Graphics g)
void paintSelectCells (Graphics g)
override void OnPaint (PaintEventArgs e)
override void OnPaintBackground (PaintEventArgs e)
override void Dispose (bool disposing)
void selectNextCell (int mode)
void ensureVisible ()
void displayBox ()
override void OnResize (EventArgs e)
override void OnMouseMove (MouseEventArgs e)
override void OnMouseUp (MouseEventArgs e)
override void OnMouseDown (MouseEventArgs e)
override void OnDoubleClick (EventArgs e)
virtual void OnSelectedRowChanged (EventArgs e)
virtual void OnCellChanged (CellEvent e)
virtual void OnColumnHeaderChanged (CellEvent e)
virtual void OnRowHeaderChanged (CellEvent e)
override bool IsInputKey (Keys keyData)

Protected Attributes

System.ComponentModel.Container components = null

Properties

Crosshairs Crosshairs
Size GridSize
 Gets or Sets the size of the grid, data in the grid will be lost if the size changes.
bool ReadOnly
 Gets or sets the read only attribute.
int PaintMode
 Gets or sets the paint mode of the grid.
int HeaderMode
int Mode
 Gets or sets the mode of the grid.
int RowHeight
 Gets or Sets the height in pixels of each row.
int RowHeaderWidth
 Gets or Sets the width in pixels of the row headers.
Color SelectedRowColor
 The background color of a selected cell.
Color SelectedForeColor
 The foreground color of a selected row.
int SelectedRow
 Gets or Sets the selected row index.
int SelectedColumn
 Gets or Sets the selected column index.
int LastSelectedRow
 Gets or Sets the selected row index.
int LastSelectedColumn
 Gets or Sets the selected column index.


Detailed Description

A simple no-nonsense grid component.


Constructor & Destructor Documentation

SimpleGrid.Grid.Grid  ) 
 

A simple no-nonsense grid component.


Member Function Documentation

void SimpleGrid.Grid.displayBox  )  [protected]
 

override void SimpleGrid.Grid.Dispose bool  disposing  )  [protected]
 

void SimpleGrid.Grid.ensureVisible  )  [protected]
 

Color SimpleGrid.Grid.getCellColor int  column,
int  row
 

Gets the cell back color.

Parameters:
column Column index
row Row index
Returns:
Color

int SimpleGrid.Grid.getColumnWidth int  column  ) 
 

Gets the width of a column.

Parameters:
column Column index
Returns:
Width in % of total grid width

string SimpleGrid.Grid.getHeader int  column  ) 
 

Gets the header text of a column.

Parameters:
column Column index
Returns:
The header text of the column

bool SimpleGrid.Grid.getHeaderEditable int  column  ) 
 

int SimpleGrid.Grid.getIntValue int  column,
int  row
 

Gets the int value of a cell.

Parameters:
column Column index
row Row index
Returns:
Value of the cell

int SimpleGrid.Grid.getMouseOverCol  ) 
 

string SimpleGrid.Grid.getRowHeader int  row  ) 
 

Gets the row header text of a column.

Parameters:
column Row index
Returns:
The header text of the row

bool SimpleGrid.Grid.getRowHeaderEditable int  row  ) 
 

string SimpleGrid.Grid.getText int  column,
int  row
 

Gets the text of a cell.

Parameters:
column Column index
row Row index
Returns:
Value text of the cell

float SimpleGrid.Grid.getValue int  column,
int  row
 

Gets the float value of a cell.

Parameters:
column Column index
row Row index
Returns:
Value of the cell

static void SimpleGrid.Grid.handleDoubleKeyPress TextBox  box,
System.Windows.Forms.KeyPressEventArgs  e,
bool  isSigned
[static]
 

override bool SimpleGrid.Grid.IsInputKey Keys  keyData  )  [protected]
 

virtual void SimpleGrid.Grid.OnCellChanged CellEvent  e  )  [protected, virtual]
 

virtual void SimpleGrid.Grid.OnColumnHeaderChanged CellEvent  e  )  [protected, virtual]
 

override void SimpleGrid.Grid.OnDoubleClick EventArgs  e  )  [protected]
 

override void SimpleGrid.Grid.OnMouseDown MouseEventArgs  e  )  [protected]
 

override void SimpleGrid.Grid.OnMouseMove MouseEventArgs  e  )  [protected]
 

override void SimpleGrid.Grid.OnMouseUp MouseEventArgs  e  )  [protected]
 

override void SimpleGrid.Grid.OnPaint PaintEventArgs  e  )  [protected]
 

override void SimpleGrid.Grid.OnPaintBackground PaintEventArgs  e  )  [protected]
 

override void SimpleGrid.Grid.OnResize EventArgs  e  )  [protected]
 

virtual void SimpleGrid.Grid.OnRowHeaderChanged CellEvent  e  )  [protected, virtual]
 

virtual void SimpleGrid.Grid.OnSelectedRowChanged EventArgs  e  )  [protected, virtual]
 

void SimpleGrid.Grid.paintAllCells Graphics  g  )  [protected]
 

void SimpleGrid.Grid.paintBackground Graphics  g  )  [protected]
 

void SimpleGrid.Grid.paintHeaders Graphics  g  )  [protected]
 

void SimpleGrid.Grid.paintSelectCells Graphics  g  )  [protected]
 

*

*

void SimpleGrid.Grid.selectNextCell int  mode  )  [protected]
 

void SimpleGrid.Grid.setAllColumnWidths int  width  ) 
 

Sets the width of all the columns.

Parameters:
column Column index
width Width in % of total grid width

void SimpleGrid.Grid.setCellColor int  column,
int  row,
Color  color
 

Sets the cell back color.

Parameters:
column Column index
row Row index
color Color

void SimpleGrid.Grid.setColumnWidth int  column,
int  width
 

Sets the width of a column.

Parameters:
column Column index
width Width in % of total grid width

void SimpleGrid.Grid.setHeader int  column,
string  header
 

Sets the header text of a column.

Parameters:
column Column index
header The header text of the column

void SimpleGrid.Grid.setHeaderEditable int  column,
bool  editable
 

void SimpleGrid.Grid.setRowHeader int  row,
string  rowHeader
 

Sets the rowHeader text of some row.

Parameters:
row row index
rowHeader The header text of the row

void SimpleGrid.Grid.setRowHeaderEditable int  column,
bool  editable
 

void SimpleGrid.Grid.setScrollBars  ) 
 

void SimpleGrid.Grid.setValue int  column,
int  row,
string  val
 

Sets the (text) value text of a cell.

Parameters:
column Column index
row Row index
value Value text of the cell

void SimpleGrid.Grid.setValue int  column,
int  row,
int  val
 

Sets the (int) value text of a cell.

Parameters:
column Column index
row Row index
value Value text of the cell

void SimpleGrid.Grid.setValue int  column,
int  row,
float  val
 

Sets the (float) value text of a cell.

Parameters:
column Column index
row Row index
value Value text of the cell


Member Data Documentation

event GridChangedHandler SimpleGrid.Grid.CellChanged
 

event GridChangedHandler SimpleGrid.Grid.ColumnHeaderChanged
 

System.ComponentModel.Container SimpleGrid.Grid.components = null [protected]
 

const int SimpleGrid.Grid.M_PAINT_ALL = 0
 

const int SimpleGrid.Grid.M_PAINT_NO_COLORS = 1
 

int SimpleGrid.Grid.MODE_DOUBLE = 0 [static]
 

int SimpleGrid.Grid.MODE_INT = 1 [static]
 

int SimpleGrid.Grid.MODE_STRING = 2 [static]
 

event GridChangedHandler SimpleGrid.Grid.RowHeaderChanged
 

event EventHandler SimpleGrid.Grid.SelectedRowChanged
 

Occurs when the user selects a row.


Property Documentation

Crosshairs SimpleGrid.Grid.Crosshairs [get]
 

Size SimpleGrid.Grid.GridSize [get, set]
 

Gets or Sets the size of the grid, data in the grid will be lost if the size changes.

int SimpleGrid.Grid.HeaderMode [get, set]
 

int SimpleGrid.Grid.LastSelectedColumn [get, set]
 

Gets or Sets the selected column index.

int SimpleGrid.Grid.LastSelectedRow [get, set]
 

Gets or Sets the selected row index.

int SimpleGrid.Grid.Mode [get, set]
 

Gets or sets the mode of the grid.

Can accept integers, floats or text:
MODE_INT
MODE_DOUBLE
MODE_STRING

int SimpleGrid.Grid.PaintMode [get, set]
 

Gets or sets the paint mode of the grid.

Can paint everything, or omit certain things:
M_PAINT_ALL
M_PAINT_NO_COLORS

bool SimpleGrid.Grid.ReadOnly [get, set]
 

Gets or sets the read only attribute.

Set to true if the grid is read only

int SimpleGrid.Grid.RowHeaderWidth [get, set]
 

Gets or Sets the width in pixels of the row headers.

int SimpleGrid.Grid.RowHeight [get, set]
 

Gets or Sets the height in pixels of each row.

int SimpleGrid.Grid.SelectedColumn [get, set]
 

Gets or Sets the selected column index.

Color SimpleGrid.Grid.SelectedForeColor [get, set]
 

The foreground color of a selected row.

int SimpleGrid.Grid.SelectedRow [get, set]
 

Gets or Sets the selected row index.

Color SimpleGrid.Grid.SelectedRowColor [get, set]
 

The background color of a selected cell.


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


BRE Documentation Home