如何将节点扩展到隐藏形式的树视图中?

发布于 2025-01-28 14:46:52 字数 422 浏览 0 评论 0原文

C#Windows表单基于应用程序的软件正在开发中。 问题在于,我添加到TreeView控件中的节点没有扩展。

执行过程如下。

  1. 用不透明度= 0执行winform,showintaskbar = false
  2. winform中的树视图控件添加节点,然后扩展节点(treeview.expandall)
  3. 带有系统托盘图标的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.

  1. Execute winform with Opacity = 0, ShowInTaskbar = false
  2. Add a node to the TreeView control in the winform and then expand the node (TreeView.ExpandAll)
  3. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文