您的位置:程序门 -> vc/mfc -> 界面



ctreectrl 的子节点缩进问题


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


ctreectrl 的子节点缩进问题[已结贴,结贴人:sjchao]
发表于:2007-09-13 10:53:20 楼主
正常情况:
     
      图标   node_parent1
                图标   node_child1
                图标   node_child2
      图标   node_parent2
                图标   node_child3

      我想把父子节点间的缩进去掉,即
      图标   node_parent1
      图标   node_child1
      图标   node_child2
      图标   node_parent2
      图标   node_child3
 
能做到吗?
发表于:2007-09-13 11:24:471楼 得分:10
可以使用   htreeitem   h   =   insertitem()来设定
发表于:2007-09-13 11:33:102楼 得分:0
请   sgwezz()   具体说明一下
发表于:2007-09-13 12:00:013楼 得分:20
自绘...
发表于:2007-09-13 12:02:544楼 得分:0
没有人知道吗?
发表于:2007-09-13 12:03:145楼 得分:0
借宝地一问:在楼主说的“正常情况”下,怎么让图标前出现“+”和“-”号呢?还有就是怎么让图标和节点名称之间出现虚线呢?
发表于:2007-09-13 12:04:376楼 得分:0
saimen     能否给个自绘的例子?

我对这个不懂
发表于:2007-09-13 12:57:137楼 得分:0
盼望大牛   出来解答一下
发表于:2007-09-13 14:01:308楼 得分:0
唉,没有人回答了。
发表于:2007-09-13 18:59:439楼 得分:20
ctreectrl::setindent(0)不能搞定吗?
发表于:2007-09-13 21:59:1810楼 得分:0
ctreectrl::setindent(0)不能搞定吗?
没作用,vc6有一点点往回缩进,但vs2005里面就没反应了。
发表于:2007-09-13 22:09:2411楼 得分:0
call   this   function   to   set   the   width   of   indentation   for   a   tree   view   control   and   redraw   the   control   to   reflect   the   new   width.
 
void   setindent(   uint   nindent);
 
nindent:width,   in   pixels,   of   the   indentation.   if   nindent   is   less   than   the   system-defined   minimum   width,   the   new   width   is   set   to   the   system-defined   minimum.

这是msdn的解释。突然想到,能否将系统定义的这个最小值给改了?


快速检索

最新资讯
热门点击