C#中 扩展⼀隐藏 Groupbox控件的问题

2024-11-20 00:30:00
推荐回答(1个)
回答1:

....有设么问题么?
bool gbVisible = false;
private void button_click(object sender, eventargs e)
{
gbVisible = !gbVisible;
groupbox.visible = gbVisible;
listbox.width = gbVisible?50:100;
button.text = gbVisible?"隐藏":"扩展";
}