开发者

Can I add space between nodes in Forms.TreeView?

开发者 https://www.devze.com 2023-04-07 08:39 出处:网络
I want my System.Windows.Forms.TreeView to have spaces between all root nodes. For example, if they look like this:

I want my System.Windows.Forms.TreeView to have spaces between all root nodes.

For example, if they look like this:

A
  B
  C
D
  E
F
  G
  H

I want them spaced apart like this:

A
  B
  C


D
  E


F
  G开发者_Go百科
  H

Thanks!


You can use the ItemHeight property which sets the height, in pixels, of each tree node in the tree view. But it just sets the spaces for every TreeNode, you cannot give different heights for different TreeNode. There is no easy way to give different ItemHeights for TreeNodes.

0

精彩评论

暂无评论...
验证码 换一张
取 消