在Tree 控件目录下有子目录Group1,Group2(Group21,Group22为Group2子目录),Group3,例:
--Group1(控件Button1 Button2 Lable1 Lable2 Edit1 Edit2)
|
--Group2 (控件Button21 Button22 Lable21 Lable22 Edit21 Edit22)
| |
| --Group21 (控件Button1 Button2 Lable1 Lable2 Edit1 Edit2)
| |
| --Group22 (控件Button1 Button2 Lable1 Lable2 Edit1 Edit2)
--Group3 (控件Button1 Button2 Lable1 Lable2 Edit1 Edit2)
当我点击Group1的时候,显示控制件Button1 Button2 Lable1 Lable2 Edit1 Edit2(控件都是动态生成的)
当我点击Group2的时候,隐藏控制件Button1 Button2 Lable1 Lable2 Edit1 Edit2,显示控件Button21 Button22 Lable21 Lable22 Edit21 Edit22(控件都是动态生成的)
问题是,我想把树改成按钮,点Button1的时候,显示控制件Button1 Button2 Lable1 Lable2 Edit1 Edit2(控件都是动态生成的)
当我点击Button2的时候,隐藏控制件Button1 Button2 Lable1 Lable2 Edit1 Edit2,显示控件Button21 Button22 Lable21 Lable22 Edit21 Edit22(控件都是动态生成的)
--Group1(控件Button1 Button2 Lable1 Lable2 Edit1 Edit2)
|
--Group2 (控件Button21 Button22 Lable21 Lable22 Edit21 Edit22)
| |
| --Group21 (控件Button1 Button2 Lable1 Lable2 Edit1 Edit2)
| |
| --Group22 (控件Button1 Button2 Lable1 Lable2 Edit1 Edit2)
--Group3 (控件Button1 Button2 Lable1 Lable2 Edit1 Edit2)
当我点击Group1的时候,显示控制件Button1 Button2 Lable1 Lable2 Edit1 Edit2(控件都是动态生成的)
当我点击Group2的时候,隐藏控制件Button1 Button2 Lable1 Lable2 Edit1 Edit2,显示控件Button21 Button22 Lable21 Lable22 Edit21 Edit22(控件都是动态生成的)
问题是,我想把树改成按钮,点Button1的时候,显示控制件Button1 Button2 Lable1 Lable2 Edit1 Edit2(控件都是动态生成的)
当我点击Button2的时候,隐藏控制件Button1 Button2 Lable1 Lable2 Edit1 Edit2,显示控件Button21 Button22 Lable21 Lable22 Edit21 Edit22(控件都是动态生成的)
这个时候,Button1还没有生成呢!是不是 这两个Button1不是一个?
如果控制用的Button1、Button2是其它的按钮,那也没有什么难度呀!直接在这两个按钮的响应函数里面做就行了!