Control.Select メソッド

定義

コントロールをアクティブにします。

オーバーロード

名前 説明
Select()

コントロールをアクティブにします。

Select(Boolean, Boolean)

子コントロールをアクティブにします。 必要に応じて、コントロールを選択するタブ オーダーの方向を指定します。

注釈

Select メソッドは、コントロールのControlStyles.Selectable スタイル ビットがtrueに設定されていて、別のコントロールに含まれており、その親コントロールがすべて表示および有効化されている場合に、コントロールをアクティブにします。

次の一覧の Windows フォーム コントロールは選択できません。 リスト内のコントロールから派生したコントロールも選択できません。

Select()

ソース:
Control.cs
ソース:
Control.cs
ソース:
Control.cs
ソース:
Control.cs
ソース:
Control.cs

コントロールをアクティブにします。

public:
 void Select();
public void Select();
member this.Select : unit -> unit
Public Sub Select ()

次のコード例では、指定した Control (選択可能な場合) を選択します。

public:
   void ControlSelect( Control^ control )
   {
      
      // Select the control, if it can be selected.
      if ( control->CanSelect )
      {
         control->Select(  );
      }
   }
public void ControlSelect(Control control)
{
   // Select the control, if it can be selected.
   if(control.CanSelect)
   {
      control.Select();
   }
}
Public Sub ControlSelect(control As Control)
   ' Select the control, if it can be selected.
   If control.CanSelect Then
      control.Select()
   End If
End Sub

こちらもご覧ください

適用対象

Select(Boolean, Boolean)

ソース:
Control.cs
ソース:
Control.cs
ソース:
Control.cs
ソース:
Control.cs
ソース:
Control.cs

子コントロールをアクティブにします。 必要に応じて、コントロールを選択するタブ オーダーの方向を指定します。

protected:
 virtual void Select(bool directed, bool forward);
protected virtual void Select(bool directed, bool forward);
abstract member Select : bool * bool -> unit
override this.Select : bool * bool -> unit
Protected Overridable Sub Select (directed As Boolean, forward As Boolean)

パラメーター

directed
Boolean

true 選択するコントロールの方向を指定する場合。それ以外の場合は false

forward
Boolean

true タブ オーダーで前方に移動する場合。タブ オーダーで後方に移動する false

注釈

directedパラメーターとforward パラメーターは、コンテナー スタイルのコントロールによって使用されます。 directed パラメーターを true に設定すると、forward パラメーターが評価され、選択するコントロールが決定されます。 forwardtrue に設定すると、タブ オーダーの次のコントロールが選択されます。falseすると、タブ オーダーの前のコントロールが選択されます。

こちらもご覧ください

適用対象