树状视图控件中的图像显示 [英] image display in tree view control

查看:88
本文介绍了树状视图控件中的图像显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我正在使用vb.net 2.0开发Windows应用程序.在我的应用程序中,我正在树形视图中以

Root
的格式显示信息,Child11 Child11
Child111

我想以``Child11'',I形式显示图像正在使用以下代码段.
将imgList设为新ImageList
imgList.Images.Add(New Icon(".. \ .. \ Images \ vac.ico"))
trvControl.ImageList = imgList

Child11 = New TreeNode("Child11")
Child11.ImageIndex = 0
现在,图标/图像显示为所有节点,但我的要求只是在"Child11"中显示.我怎么解决这个问题.

致谢,
Selvakumar


Selvakumar R

Hi All,
I am developing windows application using vb.net 2.0.  In my application i am displaying information in treeview in the format like

Root
    Child1
        Child11
            Child111

i want to display image in "Child11",  I am using the following code snippet.
Dim imgList As New ImageList
imgList.Images.Add(New Icon("..\..\Images\vac.ico"))
trvControl.ImageList = imgList

Child11= New TreeNode("Child11")
Child11.ImageIndex = 0
Child1.Nodes.Add(Child11)

Now the icon/image is displaying to all the nodes, But my requirment is only to show in "Child11".  How can i solve this problem.  

Regards,
Selvakumar
            


Selvakumar R

推荐答案

Selvakumar,

这是MSDN网站Feeback论坛,旨在用于错误报告和与MSDN网站本身有关的问题.我相信您正在寻找 Visual Basic一般论坛来协助您进行应用.技术开发人员将可以在这里为您提供帮助.

谢谢您,
CES
Selvakumar,

    This is the MSDN Site Feeback forum, which is designed for error reporting and issues dealing with the MSDN website itself. I believe you are looking for the Visual Basic General Forum to assist you in your application. The technical developers will be able to assist you there.

Thank you,
CES


这篇关于树状视图控件中的图像显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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