//容器控件为tableLayoutPanel1
foreach (Control label in tableLayoutPanel1.Controls) { if (label.GetType().ToString() == "System.Windows.Forms.Label") { label.BackColor = Color.Red; } }
原文地址:https://www.cnblogs.com/nb08611033/p/8890960.html
时间: 2024-10-08 00:38:36