DataGridColumnStyle.Paint 方法

定义

在派生类中被重写时,在 DataGrid 控件中绘制列。

重载

Paint(Graphics, Rectangle, CurrencyManager, Int32)

使用指定的 DataGridColumnStyleGraphicsRectangle 和行号绘制 CurrencyManager

Paint(Graphics, Rectangle, CurrencyManager, Int32, Boolean)

在派生类中被重写时,将绘制具有指定 DataGridColumnStyleGraphicsRectangle、行号和对齐方式的 CurrencyManager

Paint(Graphics, Rectangle, CurrencyManager, Int32, Brush, Brush, Boolean)

绘制具有指定 DataGridColumnStyleGraphicsRectangle、行号、背景色、前景色和对齐方式的 CurrencyManager

Paint(Graphics, Rectangle, CurrencyManager, Int32)

使用指定的 DataGridColumnStyleGraphicsRectangle 和行号绘制 CurrencyManager

protected public:
 abstract void Paint(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::Windows::Forms::CurrencyManager ^ source, int rowNum);
protected internal abstract void Paint (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, System.Windows.Forms.CurrencyManager source, int rowNum);
abstract member Paint : System.Drawing.Graphics * System.Drawing.Rectangle * System.Windows.Forms.CurrencyManager * int -> unit
Protected Friend MustOverride Sub Paint (g As Graphics, bounds As Rectangle, source As CurrencyManager, rowNum As Integer)

参数

g
Graphics

要绘制到的 Graphics

bounds
Rectangle

要在其中绘画的外围 Rectangle

source
CurrencyManager

该列所属的 CurrencyManager 控件的 DataGrid

rowNum
Int32

所引用的基础数据中的行号。

适用于

Paint(Graphics, Rectangle, CurrencyManager, Int32, Boolean)

在派生类中被重写时,将绘制具有指定 DataGridColumnStyleGraphicsRectangle、行号和对齐方式的 CurrencyManager

protected public:
 abstract void Paint(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::Windows::Forms::CurrencyManager ^ source, int rowNum, bool alignToRight);
protected internal abstract void Paint (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, System.Windows.Forms.CurrencyManager source, int rowNum, bool alignToRight);
abstract member Paint : System.Drawing.Graphics * System.Drawing.Rectangle * System.Windows.Forms.CurrencyManager * int * bool -> unit
Protected Friend MustOverride Sub Paint (g As Graphics, bounds As Rectangle, source As CurrencyManager, rowNum As Integer, alignToRight As Boolean)

参数

g
Graphics

要绘制到的 Graphics

bounds
Rectangle

要在其中绘画的外围 Rectangle

source
CurrencyManager

该列所属的 CurrencyManager 控件的 DataGrid

rowNum
Int32

所引用的基础数据中的行号。

alignToRight
Boolean

一个值,它指示该列的内容是否为右对齐。 如果内容应为右对齐,则为 true;否则为 false

适用于

Paint(Graphics, Rectangle, CurrencyManager, Int32, Brush, Brush, Boolean)

绘制具有指定 DataGridColumnStyleGraphicsRectangle、行号、背景色、前景色和对齐方式的 CurrencyManager

protected public:
 virtual void Paint(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::Windows::Forms::CurrencyManager ^ source, int rowNum, System::Drawing::Brush ^ backBrush, System::Drawing::Brush ^ foreBrush, bool alignToRight);
protected internal virtual void Paint (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, System.Windows.Forms.CurrencyManager source, int rowNum, System.Drawing.Brush backBrush, System.Drawing.Brush foreBrush, bool alignToRight);
abstract member Paint : System.Drawing.Graphics * System.Drawing.Rectangle * System.Windows.Forms.CurrencyManager * int * System.Drawing.Brush * System.Drawing.Brush * bool -> unit
override this.Paint : System.Drawing.Graphics * System.Drawing.Rectangle * System.Windows.Forms.CurrencyManager * int * System.Drawing.Brush * System.Drawing.Brush * bool -> unit
Protected Friend Overridable Sub Paint (g As Graphics, bounds As Rectangle, source As CurrencyManager, rowNum As Integer, backBrush As Brush, foreBrush As Brush, alignToRight As Boolean)

参数

g
Graphics

要绘制到的 Graphics

bounds
Rectangle

要在其中绘画的外围 Rectangle

source
CurrencyManager

该列所属的 CurrencyManager 控件的 DataGrid

rowNum
Int32

所引用的基础数据表中的行号。

backBrush
Brush

用于绘制背景色的 Brush

foreBrush
Brush

用于绘制前景色的 Color

alignToRight
Boolean

一个值,它指示内容是否为右对齐。 如果内容为右对齐,则为 true;否则为 false

适用于