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

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

ComboBox.SelectionChangeCommitted イベント

選択した項目が変更され、その変更ComboBox表示される発生します

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

Public Event SelectionChangeCommitted As
 EventHandler
Dim instance As ComboBox
Dim handler As EventHandler

AddHandler instance.SelectionChangeCommitted, handler
public event EventHandler SelectionChangeCommitted
/** @event */
public void add_SelectionChangeCommitted (EventHandler
 value)

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

SelectionChangeCommitted イベントと SelectionLength プロパティ使用してユーザー選択してコミットした項目に応じてテキスト ボックス長さ変更するコード例次に示します

Private Sub comboBox1_SelectionChangeCommitted(ByVal
 sender _
As Object, ByVal e As
 EventArgs) _
Handles comboBox1.SelectionChangeCommitted

    Dim senderComboBox As ComboBox = CType(sender,
 ComboBox)

    ' Change the length of the text box depending on what the user has
 
    ' selected and committed using the SelectionLength property.
    If (senderComboBox.SelectionLength > 0) Then
        textbox1.Width = senderComboBox.SelectionLength * _
            CType(Me.textbox1.Font.SizeInPoints, Integer)
        textbox1.Text = senderComboBox.SelectedText
    End If
End Sub
private void comboBox1_SelectionChangeCommitted(object
 sender, EventArgs e)
{

    ComboBox senderComboBox = (ComboBox) sender;
  
    // Change the length of the text box depending on what the user
 has 
    // selected and committed using the SelectionLength property.
    if (senderComboBox.SelectionLength > 0)
    {
        textbox1.Width = senderComboBox.SelectionLength *
            ((int) this.textbox1.Font.SizeInPoints);
        textbox1.Text = senderComboBox.SelectedText;
    }
}
void comboBox1_SelectionChangeCommitted( Object^ sender, EventArgs^
 /*e*/ )
{
   ComboBox^ senderComboBox = dynamic_cast<ComboBox^>(sender);
   
   // Change the length of the text box depending on what the user has
 
   // selected and committed using the SelectionLength property.
   if ( senderComboBox->SelectionLength > 0 )
   {
      textbox1->Width = senderComboBox->SelectionLength * ((int)this->textbox1->Font->SizeInPoints);
      textbox1->Text = senderComboBox->SelectedText;
   }
}
private void comboBox1_SelectionChangeCommitted(Object
 sender, EventArgs e)
{
    ComboBox senderComboBox = (ComboBox)sender;
    // Change the length of the text box depending on what the user
 has 
    // selected and committed using the SelectionLength property.
    if (senderComboBox.get_SelectionLength() > 0) {
        textBox1.set_Width(senderComboBox.get_SelectionLength() * (int)(
            this.textBox1.get_Font().get_SizeInPoints()));
        textBox1.set_Text(senderComboBox.get_SelectedText());
    }
} //comboBox1_SelectionChangeCommitted
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からComboBox.SelectionChangeCommitted イベントを検索した結果を表示しています。
Weblioに収録されているすべての辞書からComboBox.SelectionChangeCommitted イベントを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からComboBox.SelectionChangeCommitted イベント を検索

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS