FlexGrid for WinForms
DrawCell(DrawCellFlags) Method



DrawCellFlags that specifies the parts of the cell.
Causes the grid to paint parts of the cell (background, foreground, border, etc.)
Syntax
'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
) 

Parameters

flags
DrawCellFlags that specifies the parts of the cell.
Remarks

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.

Requirements

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

See Also

Reference

OwnerDrawCellEventArgs Class
OwnerDrawCellEventArgs Members
Overload List

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Send Feedback