TreeNode标签 [英] TreeNode Label

查看:98
本文介绍了TreeNode标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计们,


我一直在为树视图的节点播放不同的字体。

当我将字体更改为更大的尺寸时, treenode的文本区域

(标签)否

更长显示所有文本。我只看到适合那里的东西。我如何调整

这个区域的大小?我的意思是,人们会期望标签盒能够自行调整大小.....


任何想法?


提前致谢!

Hey guys,

I have been playing with different fonts for the nodes of a treeview.
When I change the font to bigger sizes, the text area of the treenode
(label) no
longer displays all the text. I only see what fits there. How do I resize
this area? I mean, one would expect the label box to resize itself.....

Any ideas?

Thanks in advance!

推荐答案

*" Juan Romero" <菊********* @ bowne.com> scripsit:
* "Juan Romero" <ju*********@bowne.com> scripsit:
我一直在为树视图的节点播放不同的字体。
当我将字体更改为更大的尺寸时,treenode的文本区域
(标签)没有
更长时间显示所有文本。我只看到适合那里的东西。我该如何调整这个区域的大小?我的意思是,人们会期望标签盒能够自行调整大小.....
I have been playing with different fonts for the nodes of a treeview.
When I change the font to bigger sizes, the text area of the treenode
(label) no
longer displays all the text. I only see what fits there. How do I resize
this area? I mean, one would expect the label box to resize itself.....




即使文本很长,我也无法重现。


-

Herfried K. Wagner [MVP]

< http://www.mvps.org/dotnet>



I am not able to repro that, even with very long texts.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>


下面是重现它的代码:


oNode.ImageIndex = 3 $ / $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ Text =" Control Panel"

tvMenus.Nodes.Add(oNode)

tvMenus.Refresh()


谢谢您的帮助。我很感激。

" Herfried K. Wagner [MVP]" <喜*************** @ gmx.at>在消息中写道

news:br ************ @ ID-208219.news.uni-berlin.de ...
Here is the code to reproduce it:

Dim oNode As New TreeNode
oNode.ImageIndex = 3
oNode.SelectedImageIndex = 3
oNode.NodeFont = New Font("Tahoma", 8, FontStyle.Bold)
oNode.Text = "Control Panel"
tvMenus.Nodes.Add(oNode)
tvMenus.Refresh()

Thank you for your help. I appreciate it.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:br************@ID-208219.news.uni-berlin.de...
* Juan Romero <菊********* @ bowne.com> scripsit:
* "Juan Romero" <ju*********@bowne.com> scripsit:
我一直在为树视图的节点播放不同的字体。
当我将字体更改为更大的尺寸时,treenode的文本区域
(标签)没有
更长时间显示所有文本。我只看到适合那里的东西。我如何
调整此区域的大小?我的意思是,人们会期望标签盒能够自行调整大小.....
I have been playing with different fonts for the nodes of a treeview.
When I change the font to bigger sizes, the text area of the treenode
(label) no
longer displays all the text. I only see what fits there. How do I resize this area? I mean, one would expect the label box to resize itself.....



即使文本很长,我也无法重复。
-
Herfried K. Wagner [MVP]
< http://www.mvps.org/dotnet>



I am not able to repro that, even with very long texts.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>



嗨Herfried,


这里已经更多了,它不是长文本,但字体似乎得到

到高,顶部被切断,你知道吗?


Cor
Hi Herfried,

This has been more here, it is not the long text but the font seems to get
to high and the top is cut off, do you know it?

Cor


这篇关于TreeNode标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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