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

被刻印的时光 ゝ 提交于 2021-01-06 03:49:03

问题


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

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)

should look like :


回答1:


Try this:

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

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



来源:https://stackoverflow.com/questions/38836627/how-can-i-eliminate-the-lines-in-treeview-while-keeping-all-arrows

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!