将数据绑定到ToolStripComboBox

将数据绑定到ToolStripComboBox

本文介绍了将数据绑定到ToolStripComboBox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

C#

我有 ToolStripComboBox 控件。有没有办法将这个 ToolStripComboBox 绑定到列表中?

I have ToolStripComboBox control. Is there a way to bind this ToolStripComboBox to a list?

推荐答案

尝试

List<string> items = new List<string>{"item1", "item2", "item3"};
toolStripComboBox1.ComboBox.DataSource = items;

这篇关于将数据绑定到ToolStripComboBox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 22:34