图标应显示在树视图左侧的数据库中。 [英] icon should display from data base on leftside of treeview.

查看:122
本文介绍了图标应显示在树视图左侧的数据库中。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了树视图,它是数据库中的绑定类别和子类别。





i想在左侧显示图标图像树视图。例如,在树视图中,我有类别如amana工具作为父节点。路由器位是父节点(amana工具)的子节点。因此,在数据库中我有amana工具的图标图像以及路由器位的图标图像。现在,我只能在树状视图中显示类别(amana工具)。但是,我需要左侧应显示其相关类别的图标图像,然后显示类别名称(amana工具)。





注意:图像图标应该从数据库绑定而不是静态。因为我需要显示超过100个类别,它的图标图像存在于数据库中。



请帮帮我。

I have created tree view which is binding categories and subcategories from data base.


i want to display icon image on left side of tree view . for example, in treeview i have categories such as amana tool as a parent node. and the router bits is child node of parent node(amana tool). so, in data base i have icon image of amana tool as well as icon image of router bits. now, i am able to show categories (amana tool) only in tree view. but, i need that left side should show the icon image of it's related categories and then categories name(amana tool).


Note : an image icon should bind from data base not static. because i need to show morethan 100 categories and it's icon image which is existing in data base.

please help me out.

推荐答案

我相信我明白你在问什么。



首先,你需要知道如何在树视图中添加图标。我不确定你是否知道如何做到这一点,因为你还没有发布任何代码。请参阅本文 [ ^ 获取信息。



其次,你说你不想拥有一个静态图像列表,而是一个动态图像列表。您必须从数据库下载图标并在运行时将它们动态加载到图像列表中。管理阵列中的哪个图标属于每个类别,并按照上面的文章显示它们。



如果你想要代码来帮助解决方案,你将会必须使用代码更新您的问题以引用。祝你好运!



Hogan
I believe I understand what you're asking.

First, you need to know how to add icons to a treeview. I'm not sure if you know how to do this or not as you have not posted any code. Please refer to This Article[^] for information.

Second, you're stating that you don't want to have a static image list, but a dynamic one. You'll have to download the icons from the DB and dynamically load them to your image list at run time. Manage which icon in the array belongs to each category and make them show up as per the article above.

If you want code to help with the solution, you'll have to update your question with code to reference against. Good luck!

Hogan


这篇关于图标应显示在树视图左侧的数据库中。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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