DataGridViewRow.DrawFocus メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DataGridViewRow.DrawFocus メソッドの意味・解説 

DataGridViewRow.DrawFocus メソッド

メモ : このメソッドは、.NET Framework version 2.0新しく追加されたものです。

指定した境界周囲に、フォーカスを表す四角形描画ます。

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Protected Friend Overridable
 Sub DrawFocus ( _
    graphics As Graphics, _
    clipBounds As Rectangle, _
    bounds As Rectangle, _
    rowIndex As Integer, _
    rowState As DataGridViewElementStates, _
    cellStyle As DataGridViewCellStyle, _
    cellsPaintSelectionBackground As Boolean
 _
)
Dim graphics As Graphics
Dim clipBounds As Rectangle
Dim bounds As Rectangle
Dim rowIndex As Integer
Dim rowState As DataGridViewElementStates
Dim cellStyle As DataGridViewCellStyle
Dim cellsPaintSelectionBackground As Boolean

Me.DrawFocus(graphics, clipBounds, bounds, rowIndex, rowState,
 cellStyle, cellsPaintSelectionBackground)
protected internal virtual void DrawFocus (
    Graphics graphics,
    Rectangle clipBounds,
    Rectangle bounds,
    int rowIndex,
    DataGridViewElementStates rowState,
    DataGridViewCellStyle cellStyle,
    bool cellsPaintSelectionBackground
)
protected public:
virtual void DrawFocus (
    Graphics^ graphics, 
    Rectangle clipBounds, 
    Rectangle bounds, 
    int rowIndex, 
    DataGridViewElementStates rowState, 
    DataGridViewCellStyle^ cellStyle, 
    bool cellsPaintSelectionBackground
)
protected void DrawFocus (
    Graphics graphics, 
    Rectangle clipBounds, 
    Rectangle bounds, 
    int rowIndex, 
    DataGridViewElementStates rowState, 
    DataGridViewCellStyle cellStyle, 
    boolean cellsPaintSelectionBackground
)
protected internal function
 DrawFocus (
    graphics : Graphics, 
    clipBounds : Rectangle, 
    bounds : Rectangle, 
    rowIndex : int, 
    rowState : DataGridViewElementStates, 
    cellStyle : DataGridViewCellStyle, 
    cellsPaintSelectionBackground : boolean
)

パラメータ

graphics

DataGridViewRow の描画使用する Graphics

clipBounds

描画必要な DataGridView の領域を表す Rectangle

bounds

描画される DataGridViewRow境界格納されRectangle

rowIndex

描画されるセルの行インデックス

rowState

行の状態を指定する DataGridViewElementStates 値のビットごとの組み合わせ

cellStyle

フォーカスを表す四角形描画使用する DataGridViewCellStyle。

cellsPaintSelectionBackground

フォーカスを表す四角形の色として、cellStyle の SelectionBackColor プロパティ使用する場合trueフォーカスを表す四角形の色として、cellStyleBackColor プロパティ使用する場合false

例外例外
例外種類条件

InvalidOperationException

行が DataGridView コントロール追加されていません。

ArgumentNullException

graphicsnull 参照 (Visual Basic では Nothing) です。

または

cellStylenull 参照 (Visual Basic では Nothing) です。

解説解説

rowIndex パラメータは、派生クラスでこのメソッドオーバーライドするときに使用できますが、DrawFocus メソッド基本クラス実装では使用されていません。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からDataGridViewRow.DrawFocus メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からDataGridViewRow.DrawFocus メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からDataGridViewRow.DrawFocus メソッド を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

DataGridViewRow.DrawFocus メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



DataGridViewRow.DrawFocus メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS