C# ToolStripStatusLabel如果获取text文字????

2024-12-26 06:35:31
推荐回答(1个)
回答1:

试试下面的方法:
foreach (object item in this.statusStrip1.Items)
{

if (item.GetType().Name == "ToolStripStatusLabel")
{
string text = ((ToolStripStatusLabel)item).Text;
MessageBox.Show(text);
}
}