Class NoxGridColumnHeaderPaintingEventArgs
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
graphicsGraphicsboundsRectanglecolumnNoxGridColumnsortOrderNoxSortOrdersortIndexintfilteredbool
Properties
Bounds
Header cell bounds (the background is already filled and the right border drawn)
public Rectangle Bounds { get; }
Property Value
Column
The column (Nothing for a row header).
public NoxGridColumn Column { get; }
Property Value
Filtered
Whether a filter is applied to the column
public bool Filtered { get; }
Property Value
Font
Font the grid uses for the header text (HeaderFont, or the grid font)
public Font Font { get; }
Property Value
ForeColor
Header text color
public Color ForeColor { get; }
Property Value
Graphics
Graphics to draw with.
public Graphics Graphics { get; }
Property Value
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
SortIndex
Sort priority when sorting by several columns (zero-based; -1 otherwise)
public int SortIndex { get; }
Property Value
SortOrder
Current sort order of the column.
public NoxSortOrder SortOrder { get; }
Property Value
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
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; }