RadioButton.OnCheckedChanged メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > RadioButton.OnCheckedChanged メソッドの意味・解説 

RadioButton.OnCheckedChanged メソッド

CheckedChanged イベント発生させます

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

Protected Overridable Sub
 OnCheckedChanged ( _
    e As EventArgs _
)
Dim e As EventArgs

Me.OnCheckedChanged(e)
protected virtual void OnCheckedChanged (
    EventArgs e
)
protected:
virtual void OnCheckedChanged (
    EventArgs^ e
)
protected void OnCheckedChanged (
    EventArgs e
)
protected function OnCheckedChanged (
    e : EventArgs
)

パラメータ

e

イベント データ格納している EventArgs。

解説解説
使用例使用例

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

Private Sub radioButton1_CheckedChanged(sender
 As Object, e As EventArgs)
    ' Change the check box position to
    ' be the 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 the 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 the opposite its 
       current position.*/
    if (radioButton1.get_CheckAlign() == ContentAlignment.MiddleLeft)
 {
        radioButton1.set_CheckAlign(ContentAlignment.MiddleRight);
    }
    else {
        radioButton1.set_CheckAlign(ContentAlignment.MiddleLeft);
    }
} //radioButton1_CheckedChanged
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

RadioButton.OnCheckedChanged メソッドのお隣キーワード
検索ランキング

   

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



RadioButton.OnCheckedChanged メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS