如何在保留所有箭头的同时消除 TreeView 中的线条 [英] How can I eliminate the lines in TreeView while keeping all arrows

查看:25
本文介绍了如何在保留所有箭头的同时消除 TreeView 中的线条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 TreeView,我正在使用 SetWindowsTheme() pinvoke 对其进行蒙皮,但是我无法删除出现的树线.

I have a TreeView which I am skinning using the SetWindowsTheme() pinvoke, however I am unable to remove the tree lines that appear.

我不想画所有者",因为我认为这相当于用一辆 18 轮卡车运送一个炸玉米饼(矫枉过正).

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).

在保留扩展箭头的同时消除树叉的干净、快速的方法是什么.(我还需要将箭头保留在根节点上)

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)

应该是这样的:

推荐答案

试试这个:

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

不过,不确定这是否会如您所愿地显示在您的主题下.

Not sure if this will show up as you wish under your theme, though.

这篇关于如何在保留所有箭头的同时消除 TreeView 中的线条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆