C1.Win.C1FlexGrid Namespace > OwnerDrawCellEventArgs Class > DrawCell Method : DrawCell(DrawCellFlags) Method |
'Declaration
Public Overloads Sub DrawCell( _ ByVal flags As DrawCellFlags _ )
'Usage
Dim instance As OwnerDrawCellEventArgs Dim flags As DrawCellFlags instance.DrawCell(flags)
public void DrawCell( DrawCellFlags flags )
public: void DrawCell( DrawCellFlags flags )
This method is typically called in OwnerDrawCell handlers when the code intends to draw some elements of the cell but not everything.
For example, the code may want to draw a custom border only. In this case, it could call e.DrawCell(DrawCellFlags.Background | DrawCellFlags.Content) to draw the cell background and content, and later draw the custom border. Or the code could want to draw a custom marker in a cell (like a note indicator in Excel). In this case, it should call e.DrawCell() to draw the entire cell, and later add the note marker (little red triangle on the top right corner of the cell).
If the owner-draw code draws the entire cell (including the background), then there's no need to call e.DrawCell at all.
This method uses VisualStyle.System for rendering fixed cells in OwnerDrawCell handler.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2