我有 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/