共用方式為


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

適用於