Version

CloseUp Method (UltraComboEditor)

Hides the list portion of the control.
Syntax
'Declaration
 
Public Sub CloseUp() 
public void CloseUp()
Remarks

If the list portion is not visible, the CloseUp method does nothing and returns.

Example
THis example demonstrates how the DropDown and CloseUp methods can be used to programmatically show or hide the dropdown list.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinEditors

    Private Sub 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 Sub

    Private Sub UltraComboEditor1_SelectionChanged(ByVal sender As Object, 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)) Then
            Me.UltraComboEditor1.CloseUp()
        End If

    End Sub
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinEditors;

		private void 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();
		}	

		private void 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();
			}
		}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also