Control.Select 方法

定義

啟動控制裝置。

多載

名稱 Description
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 在 Tab 鍵順序中向後移動。

備註

directedforward參數用於容器式控制項。 當參數 directed 設為 true時, forward 該參數會被評估以決定要選擇哪個控制項。 當 forward 設為 true時,選中制表序列中的下一個控制項;當 false,選取制表序列中的前一個控制項。

另請參閱

適用於