开发者

In Winforms, can I configure the combobox to allow values not in the drop down list?

I have a combobox that displays a list of 'active' objects the user can select from. However, if the user goes into some older data screens, the selected values of some of the comboboxes might be old and 'inactive' objects that 开发者_StackOverflowaren't in the current list.

I want the combobox to just display the old value even though it is not in the list. And I don't want the user to be able to manually edit it either.

Any suggestions?

Thanks!

Isaac


I would assume that it's your code that is removing the objects from the ComboBox in the first place, so you just... don't do that. To disallow typing into the ComboBox set its DropDownStyle property to ComboBoxStyle.DropDownList.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜