C#后端设置textbox背景颜色
时间: 2023-10-19 11:56:19 浏览: 173
在C#后端设置TextBox的背景颜色可以使用TextBox的BackColor属性。你可以将其设置为所需的颜色值。例如,如果你想将TextBox的背景颜色设置为红色,你可以使用以下代码:
TextBox1.BackColor = Color.Red;
#### 引用[.reference_title]
- *1* [c#控件TextBox、DropDownList边框变色后恢复原色](https://blog.csdn.net/itccw/article/details/121694169)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [Winform的内容](https://blog.csdn.net/weixin_46596213/article/details/121274894)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [c#基础学习](https://blog.csdn.net/m0_46215367/article/details/121377578)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文