
新建 Windows Forms 專案,拖曳一個 Panel 控制項調整大小。
private string[] _Module;
private string[,] _ChildModule;
private int _ModuleButtonHeight = 50;
private int _ChildButtonHeight = 30;
public string[] Module {
get { return _Module; }
set { _Module = value; }
}
public string[,] ChildModule {
get { return _ChildModule; }
set { _ChildModule = value; }
}
於 Form_Load 動態建立按鈕並處理點擊事件,詳見第 2 部分 (ID 79496)。