我有两个有子结点的父结点 A、B,因同时展开两个的话会有滚动条的,现比如:
A、B结点只展开一个,即展开A时先合上B再展开A,展开B时先合上B再展开A,该在哪个事件里怎么写?谢谢,
我是在它的Expanding中这样写:
    if TreeView1.Items[0].Focused then
     if  TreeView1.Items[19].Expanded then
        TreeView1.Items[19].Collapse(true);
    if TreeView1.Items[19].Focused then
     if TreeView1.Items[0].Expanded then
        TreeView1.Items[0].Collapse(true);
但没用。