开发者

Delphi: align and visibility of splitter

There is a tree view, an align is left. And there is a splitter, the same, an align is left. The tree view is the first, the slitter is the second.

If to do:

TreeView1.Visible:=false;
Splitter1.Visible:=false;

And then:

TreeView1.Visible:=true;
Splitter1.Visible开发者_StackOverflow:=true;

The splitter will be the first from the left. Must be the second. How to prevent this?

Thanks!!!


AFAIK there is no way to prevent this happening (even when you change the order of making them visible again, sometimes they still end up in wrong way). Add

Splitter1.Left := Treeview1.Left + Treeview1.Width;

after making them visible again, this should move splitter back into right position.


To make splitter second from the left you must make sure that TreeView is first on the left by setting:

TreeView1.Visible := True;
Splitter1.Visible := True;
Treeview1.Left := 0;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜