實現效果:
知識運用:
按鈕的AutoSize屬性 //獲取或設置一個值 以指示按鈕是否基於其內容調整大小
public override bool AutoSize{get;set;}
實現代碼:
private void button2_Click(object sender, EventArgs e) { this.button1.AutoSize = true; this.button1.Text = textBox1.Text; }
實現效果:
知識運用:
按鈕的AutoSize屬性 //獲取或設置一個值 以指示按鈕是否基於其內容調整大小
public override bool AutoSize{get;set;}
實現代碼:
private void button2_Click(object sender, EventArgs e) { this.button1.AutoSize = true; this.button1.Text = textBox1.Text; }
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。