Table of Contents

Class NoxGridCellPaintingEventArgs

Namespace
Nox.Grid.WinForms
Assembly
Nox.Grid.WinForms.dll

Custom cell drawing. Handled = True stops the grid from drawing the cell content (text and boxes).

public class NoxGridCellPaintingEventArgs : EventArgs
Inheritance
NoxGridCellPaintingEventArgs
Inherited Members

Constructors

NoxGridCellPaintingEventArgs(Graphics, Rectangle, int, NoxGridColumn, object, string, bool)

Creates the event data.

public NoxGridCellPaintingEventArgs(Graphics graphics, Rectangle bounds, int rowIndex, NoxGridColumn column, object value, string formattedValue, bool selected)

Parameters

graphics Graphics
bounds Rectangle
rowIndex int
column NoxGridColumn
value object
formattedValue string
selected bool

Properties

Alignment

Horizontal alignment the grid would use.

public HorizontalAlignment Alignment { get; }

Property Value

HorizontalAlignment

BackColor

Background color already painted for this cell

public Color BackColor { get; }

Property Value

Color

Bounds

Bounds of the cell in grid coordinates.

public Rectangle Bounds { get; }

Property Value

Rectangle

Column

The column (Nothing for a row header).

public NoxGridColumn Column { get; }

Property Value

NoxGridColumn

Font

Font the grid uses for this cell (column Font, cell style and bold applied)

public Font Font { get; }

Property Value

Font

ForeColor

Text color the grid uses for this cell (formatting and selection applied)

public Color ForeColor { get; }

Property Value

Color

FormattedValue

Text the grid would draw.

public string FormattedValue { get; }

Property Value

string

Graphics

Graphics to draw with.

public Graphics Graphics { get; }

Property Value

Graphics

Handled

True skips the default content (text, check box, glyphs). The background and grid lines are always painted before this event: draw your own background and leave Handled False to have the default content drawn over it, or draw content and set Handled True.

public bool Handled { get; set; }

Property Value

bool

RowIndex

Row index of the cell (-1 for a column header).

public int RowIndex { get; }

Property Value

int

Selected

Whether the cell is selected.

public bool Selected { get; }

Property Value

bool

Value

The cell value.

public object Value { get; }

Property Value

object