Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 c# 和 Visual Studio 2010。我有一个 8 行 8 列的表格布局面板。在一列中,用户将从组合框中的下拉列表中选择一个项目。根据他们的选择,该行应采用某种颜色。任何帮助将不胜感激。
将事件处理程序添加到您的组合框。
public void MyComboBox_OnSelectedItemChanged(object sender, EventArgs e) { //change the color here }
确保将事件处理程序添加到 ComboBox 属性。