IDataGridViewEditingControl.EditingControlWantsInputKey メソッド
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Function EditingControlWantsInputKey ( _ keyData As Keys, _ dataGridViewWantsInputKey As Boolean _ ) As Boolean
Dim instance As IDataGridViewEditingControl Dim keyData As Keys Dim dataGridViewWantsInputKey As Boolean Dim returnValue As Boolean returnValue = instance.EditingControlWantsInputKey(keyData, dataGridViewWantsInputKey)
function EditingControlWantsInputKey ( keyData : Keys, dataGridViewWantsInputKey : boolean ) : boolean
戻り値
指定されたキーが編集コントロールによって処理される通常の入力キーの場合は true。それ以外の場合は false。

編集コントロールは、コントロールによって処理する必要がある入力キーと、DataGridView によって処理する必要がある入力キーを判断するために、このメソッドを実装します。
EditingControlWantsInputKey メソッドは、DataGridView によって呼び出されます。DataGridView は、自身が keyData を処理できる場合には、dataGridViewWantsInputKey を true に設定します。編集コントロールが keyData の処理を DataGridView に委任できる場合、dataGridViewWantsInputKey が true であれば、EditingControlWantsInputKey は false を返します。EditingControlWantsInputKey の実装によっては、dataGridViewWantsInputKey の値が true であってもこれを無視し、編集コントロールで keyData を処理する場合があります。

このメンバの実装を次のコード例に示します。次の例は「方法 : Windows フォーム DataGridView Cells でコントロールをホストする」で取り上げている例の一部です。
Public Function EditingControlWantsInputKey(ByVal key As Keys, _ ByVal dataGridViewWantsInputKey As Boolean) As Boolean _ Implements IDataGridViewEditingControl.EditingControlWantsInputKey ' Let the DateTimePicker handle the keys listed. Select Case key And Keys.KeyCode Case Keys.Left, Keys.Up, Keys.Down, Keys.Right, _ Keys.Home, Keys.End, Keys.PageDown, Keys.PageUp Return True Case Else Return False End Select End Function
// Implements the IDataGridViewEditingControl.EditingControlWantsInputKey // method. public bool EditingControlWantsInputKey( Keys key, bool dataGridViewWantsInputKey) { // Let the DateTimePicker handle the keys listed. switch (key & Keys.KeyCode) { case Keys.Left: case Keys.Up: case Keys.Down: case Keys.Right: case Keys.Home: case Keys.End: case Keys.PageDown: case Keys.PageUp: return true; default: return false; } }

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からIDataGridViewEditingControl.EditingControlWantsInputKey メソッドを検索する場合は、下記のリンクをクリックしてください。

- IDataGridViewEditingControl.EditingControlWantsInputKey メソッドのページへのリンク