如何将节点扩展到隐藏形式的树视图中?
C#Windows表单基于应用程序的软件正在开发中。 问题在于,我添加到TreeView控件中的节点没有扩展。
执行过程如下。
- 用不透明度= 0执行winform,showintaskbar = false
- winform中的树视图控件添加节点,然后扩展节点(treeview.expandall)
- 带有系统托盘图标的winform show winform 问题:TreeView控件的节点缩小了。
我发现的解决方案是 在启动('opacity = 1')上显示Winform或使用'showintaskbar = true'执行'之后,将节点添加到TreeView Control并扩展功能正常。
我是C#的新手,C#仅使用MFC,但我无法理解这种行为。有一个更生动的解决方案吗?
非常感谢。
c# windows forms App-based software is under development.
The problem is that the node I added to the TreeView control is not expanded.
The execution procedure is as follows.
- Execute winform with Opacity = 0, ShowInTaskbar = false
- Add a node to the TreeView control in the winform and then expand the node (TreeView.ExpandAll)
- Show winform with system tray icon
Issue: The TreeView control's nodes are shrunk.
The solution I found is
After displaying the winform at startup ('Opacity=1') or executing with'ShowInTaskbar=true', adding a node to the TreeView control and expanding it works fine.
I'm new to C#, which keeps using only MFC, but I can't understand this behavior. Is there a more vivid solution?
Thank you very much.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论