RadioButton.CheckedChanged イベントとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > RadioButton.CheckedChanged イベントの意味・解説 

RadioButton.CheckedChanged イベント

Checked プロパティの値が変更され場合発生します

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

Dim instance As RadioButton
Dim handler As EventHandler

AddHandler instance.CheckedChanged, handler
public event EventHandler CheckedChanged
/** @event */
public void add_CheckedChanged (EventHandler
 value)

/** @event */
public void remove_CheckedChanged (EventHandler
 value)
JScript では、イベント使用できますが、新規に宣言することはできません。
解説解説
使用例使用例

CheckAlign プロパティ実行時変更する方法次のコード例示しますChecked 値が変更されると、RadioButtonチェック ボックス部分テキスト左右に移動します。この例は、RadioButton コントロールフォーム上でインスタンス化されていること、および System.Drawing 名前空間への参照含まれていることを前提にしています。

Private Sub radioButton1_CheckedChanged(sender
 As Object, e As EventArgs)
    ' Change the check box position to be opposite its current position.
    If radioButton1.CheckAlign = ContentAlignment.MiddleLeft Then
        radioButton1.CheckAlign = ContentAlignment.MiddleRight
    Else
        radioButton1.CheckAlign = ContentAlignment.MiddleLeft
    End If
End Sub

private void radioButton1_CheckedChanged(Object
 sender, 
                                         EventArgs e)
{
   // Change the check box position to be opposite its current position.
   if (radioButton1.CheckAlign == ContentAlignment.MiddleLeft)
   {
      radioButton1.CheckAlign = ContentAlignment.MiddleRight;
   }
   else
   {
      radioButton1.CheckAlign = ContentAlignment.MiddleLeft;
   }
}

private:
   Void radioButton1_CheckedChanged( System::Object^ sender,
      System::EventArgs^ e )
   {
      // Change the check box position to be opposite its current position.
      if ( radioButton1->CheckAlign == ContentAlignment::MiddleLeft
 )
      {
         radioButton1->CheckAlign = ContentAlignment::MiddleRight;
      }
      else
      {
         radioButton1->CheckAlign = ContentAlignment::MiddleLeft;
      }
   }
private void radioButton1_CheckedChanged(Object
 sender, EventArgs e)
{
    // Change the check box position to be opposite its current position.
    if (radioButton1.get_CheckAlign().Equals(ContentAlignment.MiddleLeft))
 {
        radioButton1.set_CheckAlign(ContentAlignment.MiddleRight);
    }
    else {
        radioButton1.set_CheckAlign(ContentAlignment.MiddleLeft);
    }
} //radioButton1_CheckedChanged
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

RadioButton.CheckedChanged イベントのお隣キーワード
検索ランキング

   

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



RadioButton.CheckedChanged イベントのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS