gpt4 book ai didi

c# - 同时选择不同 TreeView 中的2个节点

转载 作者:太空宇宙 更新时间:2023-11-03 21:56:03 25 4
gpt4 key购买 nike

我有 2 个 TreeView 控件,用户在 TreeView1 中选择一个节点,然后在 TreeView2 中选择一个节点。
问题是当他选择另一个 TreeView 的节点时,前一个节点离开了焦点,这样用户就不知道选择了哪个 TreeView。

有什么方法可以让焦点保持在 2 个 TreeNodes 上或更改 ForeColor/使所选节点加粗,以便所选节点仍然可见。

最佳答案

设置 TreeView 的 HideSelection属性为假:

Gets or sets a value indicating whether the selected tree node remains highlighted even when the tree view has lost the focus.

关于c# - 同时选择不同 TreeView 中的2个节点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12245091/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com