组合框和下拉列表之间的区别 [英] Difference between combobox and dropdownlist

查看:88
本文介绍了组合框和下拉列表之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

组合框和下拉列表的区别是什么?

What''s the difference combo box and drop down list?
Under what conditions should any of them be used?

推荐答案

术语ComboBox和DropDownList都通常用于描述System.Windows.Forms.ComboBox控件. />
但是,存在细微的差异(并非始终可见). comboBox类具有一个DropDownStyle属性,可以将其设置为以下值之一(从MSDN页面中翻录了starigt的描述:
The terms ComboBox and DropDownList are both commonly used to describe the System.Windows.Forms.ComboBox control.

There is a subtle difference (not always observed), however. The comboBox class has a DropDownStyle property that can be set to one of the following (descriptions ripped starigt from the MSDN page: http://msdn.microsoft.com/en-us/library/system.windows.forms.comboboxstyle.aspx):

Simple

Specifies that the list is always visible and that the text portion is editable. This means that the user can enter a new value and is not limited to selecting an existing value in the list. 

DropDown

Specifies that the list is displayed by clicking the down arrow and that the text portion is editable. This means that the user can enter a new value and is not limited to selecting an existing value in the list. When using this setting, the Append value of AutoCompleteMode works the same as the SuggestAppend value. This is the default style. 

DropDownList

Specifies that the list is displayed by clicking the down arrow and that the text portion is not editable. This means that the user cannot enter a new value. Only values already in the list can be selected. The list displays only if AutoCompleteMode is Suggest or SuggestAppend.



因此,术语DropDownList通常用于描述具有DropDownList下拉样式的组合框,即具有不可编辑文本字段的组合框



Therefore the term DropDownList is often used to describe a combobox with a drop down style of DropDownList, i.e. a combobox with a non-editable text field


目前尚不清楚您要问的是什么.如果这是一个普遍的问题,请检查此链接.
http://msdn.microsoft.com/en-us/library/aa511458.aspx [ ^ ]

如果您在谈论控件,请组合框 [ DropDownList [
It is not clear what you are asking. If this is a general question, check this link.
http://msdn.microsoft.com/en-us/library/aa511458.aspx[^]

If you are talking about controls, ComboBox[^] is forms control while DropDownList[^] is web control.


这篇关于组合框和下拉列表之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆