简体   繁体   English

如何在保留所有箭头的同时消除TreeView中的线条

[英]How can I eliminate the lines in TreeView while keeping all arrows

I have a TreeView which I am skinning using the SetWindowsTheme() pinvoke, however I am unable to remove the tree lines that appear. 我有一个TreeView,正在使用SetWindowsTheme() pinvoke对其进行外观设置,但是我无法删除出现的树线。

I do not wish to do 'Owner' drawn as I believe that would be the equivalent of taking an 18-wheeler truck to deliver one taco (overkill). 我不希望绘制“所有者”,因为我认为这等同于乘坐18轮卡车交付一辆炸玉米饼(过度杀伤力)。

What is a clean, quick way to eliminate the Tree forks while keeping the expansion arrows. 什么是在保持展开箭头的同时消除树状分叉的干净,快速的方法。 (I need to keep the arrows on the root nodes as well) (我也需要将箭头保留在根节点上)

树箭头

should look like : 应该看起来像:

Treeview没有叉子

Try this: 尝试这个:

yourTreeView.ShowLines = false;
yourTreeView.ShowPlusMinus = true;

在此处输入图片说明

Not sure if this will show up as you wish under your theme, though. 不过,不确定在主题下是否会如您所愿显示。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM