ToolStripComboBox.DropDownStyle Propiedad

Definición

Obtiene o establece un valor que especifica el estilo del ToolStripComboBox.

public:
 property System::Windows::Forms::ComboBoxStyle DropDownStyle { System::Windows::Forms::ComboBoxStyle get(); void set(System::Windows::Forms::ComboBoxStyle value); };
public System.Windows.Forms.ComboBoxStyle DropDownStyle { get; set; }
member this.DropDownStyle : System.Windows.Forms.ComboBoxStyle with get, set
Public Property DropDownStyle As ComboBoxStyle

Valor de propiedad

ComboBoxStyle

Uno de los valores de ComboBoxStyle. De manera predeterminada, es DropDown.

Ejemplos

En el ejemplo de código siguiente se muestra la sintaxis para establecer varias ToolStripComboBox propiedades, incluida la DropDownStyle propiedad .

// The following code example demonstrates the syntax for setting
// various ToolStripComboBox properties.
// 
toolStripComboBox1.AutoCompleteCustomSource.AddRange(new string[] {
"aaa",
"bbb",
"ccc"});
toolStripComboBox1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
toolStripComboBox1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource;
toolStripComboBox1.DropDownHeight = 110;
toolStripComboBox1.DropDownWidth = 122;
toolStripComboBox1.FlatStyle = System.Windows.Forms.FlatStyle.Standard;
toolStripComboBox1.IntegralHeight = false;
toolStripComboBox1.Items.AddRange(new object[] {
"xxx",
"yyy",
"zzz"});
toolStripComboBox1.MaxDropDownItems = 9;
toolStripComboBox1.MergeAction = System.Windows.Forms.MergeAction.Insert;
toolStripComboBox1.Name = "toolStripComboBox1";
toolStripComboBox1.Size = new System.Drawing.Size(121, 25);
toolStripComboBox1.Sorted = true;
' The following code example demonstrates the syntax for setting
' various ToolStripComboBox properties.
' 
toolStripComboBox1.AutoCompleteCustomSource.AddRange(New String() {"aaa", "bbb", "ccc"})
toolStripComboBox1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
toolStripComboBox1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
toolStripComboBox1.DropDownHeight = 110
toolStripComboBox1.DropDownWidth = 122
toolStripComboBox1.FlatStyle = System.Windows.Forms.FlatStyle.Standard
toolStripComboBox1.IntegralHeight = False
toolStripComboBox1.Items.AddRange(New Object() {"xxx", "yyy", "zzz"})
toolStripComboBox1.MaxDropDownItems = 9
toolStripComboBox1.MergeAction = System.Windows.Forms.MergeAction.Insert
toolStripComboBox1.Name = "toolStripComboBox1"
toolStripComboBox1.Size = New System.Drawing.Size(121, 25)
toolStripComboBox1.Sorted = True

Comentarios

La DropDownStyle propiedad controla la interfaz que se presenta al usuario. Puede escribir un valor que permita un cuadro de lista desplegable simple, donde la lista siempre se muestra, un cuadro de lista desplegable, donde la parte del texto no es editable y debe seleccionar una flecha para ver la lista desplegable o el cuadro de lista desplegable predeterminado, donde la parte de texto se puede editar y el usuario debe presionar la tecla de flecha para ver la lista. Para mostrar siempre una lista que el usuario no puede editar, use un ListBox control .

Se aplica a