Imports Infragistics.Win
Imports Infragistics.Win.UltraWinEditors
PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
' Clear the existing list
Me.UltraComboEditor1.Items.Clear()
' Add 5 new items to the list
Me.UltraComboEditor1.Items.Add(1, "One")
Me.UltraComboEditor1.Items.Add(2, "Two")
Me.UltraComboEditor1.Items.Add(3, "Three")
Me.UltraComboEditor1.Items.Add(4, "Four")
Me.UltraComboEditor1.Items.Add(5, "Five")
' Make the first item in the list the SelectedItem
Me.UltraComboEditor1.SelectedIndex = 0
' Use the DropDown method to programmatically make
' the list portion appear
Me.UltraComboEditor1.DropDown()
End SubPrivateSub UltraComboEditor1_SelectionChanged(ByVal sender AsObject, ByVal e As System.EventArgs) Handles UltraComboEditor1.SelectionChanged
' If the last item in the list was selected, use the CloseUp method
' to programmatically hide the list portion
If (Me.UltraComboEditor1.SelectedIndex = (Me.UltraComboEditor1.Items.Count - 1)) ThenMe.UltraComboEditor1.CloseUp()
EndIfEnd Sub
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinEditors;
privatevoid button1_Click(object sender, System.EventArgs e)
{
// Clear the existing list
this.ultraComboEditor1.Items.Clear();
// Add 5 new items to the list
this.ultraComboEditor1.Items.Add( 1, "One" );
this.ultraComboEditor1.Items.Add( 2, "Two" );
this.ultraComboEditor1.Items.Add( 3, "Three" );
this.ultraComboEditor1.Items.Add( 4, "Four" );
this.ultraComboEditor1.Items.Add( 5, "Five" );
// Make the first item in the list the SelectedItem
this.ultraComboEditor1.SelectedIndex = 0;
// Use the DropDown method to programmatically make
// the list portion appear
this.ultraComboEditor1.DropDown();
}
privatevoid ultraComboEditor1_SelectionChanged(object sender, System.EventArgs e)
{
// If the last item in the list was selected, use the CloseUp method
// to programmatically hide the list portion
if ( this.ultraComboEditor1.SelectedIndex == (this.ultraComboEditor1.Items.Count - 1) )
{
this.ultraComboEditor1.CloseUp();
}
}