Version

DropDownListWidth Property

Gets/sets the width of the dropdown list.
Syntax
'Declaration
 
Public Property DropDownListWidth As Integer
public int DropDownListWidth {get; set;}
Remarks

Setting the property to 0 results in the dropdown list autosizing its width to be equal to the control's width

Setting the property to -1 results in the dropdown list autosizing its width to accommodate the longest item's text

Example
This sample shows how to swap the alignment of the controls from left to right.

Private Sub SwapAlignment()

    Me.UltraComboEditor1.DropDownListWidth = 150

    If Me.UltraComboEditor1.DropDownButtonAlignment = Infragistics.Win.ButtonAlignment.Right Then
        Me.UltraComboEditor1.DropDownButtonAlignment = Infragistics.Win.ButtonAlignment.Left
        Me.UltraComboEditor1.DropDownListAlignment = Infragistics.Win.DropDownListAlignment.Right
    Else
        Me.UltraComboEditor1.DropDownButtonAlignment = Infragistics.Win.ButtonAlignment.Right
        Me.UltraComboEditor1.DropDownListAlignment = Infragistics.Win.DropDownListAlignment.Left
    End If

End Sub
private void SwapAlignment()
{

	this.ultraComboEditor1.DropDownListWidth = 150;

	if(this.ultraComboEditor1.DropDownButtonAlignment == Infragistics.Win.ButtonAlignment.Right)
	{
		this.ultraComboEditor1.DropDownButtonAlignment = Infragistics.Win.ButtonAlignment.Left;
		this.ultraComboEditor1.DropDownListAlignment = Infragistics.Win.DropDownListAlignment.Right  ;
	}
	else
	{
		this.ultraComboEditor1.DropDownButtonAlignment = Infragistics.Win.ButtonAlignment.Right;
		this.ultraComboEditor1.DropDownListAlignment = Infragistics.Win.DropDownListAlignment.Left;
	}																						

}
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