CheckBox.Appearance CheckBox.Appearance CheckBox.Appearance CheckBox.Appearance Property

定義

取得または設定の外観を決定する値をCheckBoxコントロール。Gets or sets the value that determines the appearance of a CheckBox control.

public:
 property System::Windows::Forms::Appearance Appearance { System::Windows::Forms::Appearance get(); void set(System::Windows::Forms::Appearance value); };
public System.Windows.Forms.Appearance Appearance { get; set; }
member this.Appearance : System.Windows.Forms.Appearance with get, set
Public Property Appearance As Appearance

プロパティ値

Appearance 値のいずれか 1 つ。One of the Appearance values. 既定値は Normal です。The default value is Normal.

例外

割り当てられた値がないのいずれか、Appearance値。The value assigned is not one of the Appearance values.

次のコード例は、作成し、初期化、 CheckBox、トグル ボタンの外観が与えられます、設定AutoCheckfalseに追加します、Formします。The following code example creates and initializes a CheckBox, gives it the appearance of a toggle button, sets AutoCheck to false, and adds it to a Form.

public:
   void InstantiateMyCheckBox()
   {
      // Create and initialize a CheckBox.   
      CheckBox^ checkBox1 = gcnew CheckBox;
      
      // Make the check box control appear as a toggle button.
      checkBox1->Appearance = Appearance::Button;
      
      // Turn off the update of the display on the click of the control.
      checkBox1->AutoCheck = false;
      
      // Add the check box control to the form.
      this->Controls->Add( checkBox1 );
   }
public void InstantiateMyCheckBox()
 {
    // Create and initialize a CheckBox.   
    CheckBox checkBox1 = new CheckBox(); 
    
    // Make the check box control appear as a toggle button.
    checkBox1.Appearance = Appearance.Button;
 
    // Turn off the update of the display on the click of the control.
    checkBox1.AutoCheck = false;
 
    // Add the check box control to the form.
    Controls.Add(checkBox1);
 }
 
Public Sub InstantiateMyCheckBox()
    ' Create and initialize a CheckBox.   
    Dim checkBox1 As New CheckBox()
    
    ' Make the check box control appear as a toggle button.
    checkBox1.Appearance = Appearance.Button
    
    ' Turn off the update of the display on the click of the control.
    checkBox1.AutoCheck = False
    
    ' Add the check box control to the form.
    Controls.Add(checkBox1)
End Sub 'InstantiateMyCheckBox

注釈

場合Appearance値に設定されてNormalCheckBoxが標準的な外観です。If Appearance value is set to Normal, the CheckBox has a typical appearance. 値が設定されている場合ButtonCheckBox状態の上下を切り替えられるトグル ボタンのように表示されます。If the value is set to Button, the CheckBox appears like a toggle button, which can be toggled to an up or down state.

適用対象

こちらもご覧ください