TableLayoutCellPaintEventArgs.Row プロパティ
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

セルの行の位置。

TableLayoutCellPaintEventArgs を使用して、TableLayoutPanel コントロールの表示形式をカスタマイズする方法を次の例に示します。このコード例は TableLayoutPanel コントロールのトピックで取り上げているコード例の一部です。
Public Class DemoTableLayoutPanel Inherits TableLayoutPanel Protected Overrides Sub OnCellPaint( _ ByVal e As System.Windows.Forms.TableLayoutCellPaintEventArgs) MyBase.OnCellPaint(e) Dim c As Control = Me.GetControlFromPosition(e.Column, e.Row) If Not c Is Nothing Then Dim g As Graphics = e.Graphics g.DrawRectangle( _ Pens.Red, _ e.CellBounds.Location.X + 1, _ e.CellBounds.Location.Y + 1, _ e.CellBounds.Width - 2, _ e.CellBounds.Height - 2) g.FillRectangle( _ Brushes.Blue, _ e.CellBounds.Location.X + 1, _ e.CellBounds.Location.Y + 1, _ e.CellBounds.Width - 2, _ e.CellBounds.Height - 2) End If End Sub End Class
public class DemoTableLayoutPanel : TableLayoutPanel { protected override void OnCellPaint(TableLayoutCellPaintEventArgs e) { base.OnCellPaint(e); Control c = this.GetControlFromPosition(e.Column, e.Row); if ( c != null ) { Graphics g = e.Graphics; g.DrawRectangle( Pens.Red, e.CellBounds.Location.X+1, e.CellBounds.Location.Y + 1, e.CellBounds.Width - 2, e.CellBounds.Height - 2); g.FillRectangle( Brushes.Blue, e.CellBounds.Location.X + 1, e.CellBounds.Location.Y + 1, e.CellBounds.Width - 2, e.CellBounds.Height - 2); }; } }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


TableLayoutCellPaintEventArgs クラス
TableLayoutCellPaintEventArgs メンバ
System.Windows.Forms 名前空間
TableLayoutPanel
Weblioに収録されているすべての辞書からTableLayoutCellPaintEventArgs.Row プロパティを検索する場合は、下記のリンクをクリックしてください。

- TableLayoutCellPaintEventArgs.Row プロパティのページへのリンク