DataGridColumnStyle.Paint 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在衍生類別中覆寫時,繪製 DataGrid 控制項的資料行。
多載
Paint(Graphics, Rectangle, CurrencyManager, Int32)
以指定的 DataGridColumnStyle、Graphics、Rectangle 和資料列編號繪製 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)
參數
- source
- CurrencyManager
此資料行所屬之 CurrencyManager 控制項的 DataGrid。
- rowNum
- Int32
第一個資料中所參考的資料列編號。
適用於
Paint(Graphics, Rectangle, CurrencyManager, Int32, Boolean)
在衍生類別中覆寫時,以指定的 DataGridColumnStyle、Graphics、Rectangle、列號和對齊繪製 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)
參數
- source
- CurrencyManager
此資料行所屬之 CurrencyManager 控制項的 DataGrid。
- rowNum
- Int32
第一個資料中所參考的資料列編號。
- alignToRight
- Boolean
數值,指出是否將資料行內容靠右對齊。 如果內容應靠右對齊,則為 true
,否則為 false
。
適用於
Paint(Graphics, Rectangle, CurrencyManager, Int32, Brush, Brush, Boolean)
以指定的 DataGridColumnStyle、Graphics、Rectangle 和資料列編號、背景色彩、前景色彩和對齊,繪製 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)
參數
- source
- CurrencyManager
此資料行所屬之 CurrencyManager 控制項的 DataGrid。
- rowNum
- Int32
第一個資料表中所參考的資料列編號。
- alignToRight
- Boolean
數值,指出是否將內容靠右對齊。 如果內容為靠右對齊,則為 true
,否則為 false
。