Table of Contents

Class NoxGridColumnHeaderPaintingEventArgs

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

Custom column header drawing. Handled = True skips the default header content (text, sort glyph, filter button).

public class NoxGridColumnHeaderPaintingEventArgs : EventArgs
Inheritance
NoxGridColumnHeaderPaintingEventArgs
Inherited Members

Constructors

NoxGridColumnHeaderPaintingEventArgs(Graphics, Rectangle, NoxGridColumn, NoxSortOrder, int, bool)

Creates the event data.

public NoxGridColumnHeaderPaintingEventArgs(Graphics graphics, Rectangle bounds, NoxGridColumn column, NoxSortOrder sortOrder, int sortIndex, bool filtered)

Parameters

graphics Graphics
bounds Rectangle
column NoxGridColumn
sortOrder NoxSortOrder
sortIndex int
filtered bool

Properties

Bounds

Header cell bounds (the background is already filled and the right border drawn)

public Rectangle Bounds { get; }

Property Value

Rectangle

Column

The column (Nothing for a row header).

public NoxGridColumn Column { get; }

Property Value

NoxGridColumn

Filtered

Whether a filter is applied to the column

public bool Filtered { get; }

Property Value

bool

Font

Font the grid uses for the header text (HeaderFont, or the grid font)

public Font Font { get; }

Property Value

Font

ForeColor

Header text color

public Color ForeColor { get; }

Property Value

Color

Graphics

Graphics to draw with.

public Graphics Graphics { get; }

Property Value

Graphics

Handled

True skips the default text, sort glyph and filter button. The background and border are always painted before this event, so leaving Handled False lets you paint a background (or marks) under the default content.

public bool Handled { get; set; }

Property Value

bool

SortIndex

Sort priority when sorting by several columns (zero-based; -1 otherwise)

public int SortIndex { get; }

Property Value

int

SortOrder

Current sort order of the column.

public NoxSortOrder SortOrder { get; }

Property Value

NoxSortOrder

TextBounds

Where the grid draws the header text: inside the padding, left of the sort glyph and filter button, right of the header check box. Use it with TextFont to draw the text exactly where and how the default painting does.

public Rectangle TextBounds { get; }

Property Value

Rectangle

TextFont

Font the grid draws the header text with: the HeaderTextFit = ShrinkText font that makes the text fit TextBounds, otherwise the same as Font (also when HeaderWrapText is True). The grid owns and caches this font: do not dispose it, and use it only during the event.

public Font TextFont { get; }

Property Value

Font