TreeView设置节点图标

procedure TForm1.Button1Click(Sender: TObject);
var
i:Integer;
begin
with TreeView1 do
begin
for i:= 0 to Items.Count -1 do
begin
if Items[i].HasChildren then
begin
Items[i].ImageIndex:=0;
Items[i].SelectedIndex:=0;
Items[i].StateIndex:=0;
end
else
begin
Items[i].ImageIndex:=1;
Items[i].SelectedIndex:=1;
Items[i].StateIndex:=1;
end;
end;
end;
end;
TreeView设置节点图标的更多相关文章
- DELPHI TreeView 文件目录树和 设置节点图标 完整
DELPHI TreeView 文件目录树和 设置节点图标 下载地址 http://download.csdn.net/detail/teststudio/6448293 需要制作 ...
- C# WinForm设置TreeView选中节点
这里假定只有两级节点,多级方法类似.遍历节点,根据选中节点文本找到要选中的节点.treeView.SelectedNode = selectNode; /// <summary> /// ...
- TreeView中节点勾选设置
本文转载:http://www.cnblogs.com/luxiaoxun/p/3288003.html 很不错的文章:http://www.cnblogs.com/allen0118/archive ...
- delphi treeview的子节点图标?
代码实现不同的子节点图标效果. unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, ...
- Dev TreeList 添加节点图标问题
1. 在设计界面添加imageCollection控件,在属性页设置图标(可Load from disk,也可从Load from dev gallery) 2. TreeList控件有一个叫做Cus ...
- TreeView 树节点的处理
TreeView 树节点的处理 using System; using System.Collections.Generic; using System.ComponentModel; using S ...
- iOS----Xcode6或者Xcode7设置LaunchImage图标
最近设置LaunchImage图标时发现怎么都没有效果,后来发现是Xcode6中新建项目的时候会默认添加一个LaunchScreen.xib的文件,我们启动程序的时候也会发现,加载的时LaunchSc ...
- WinForm------TreeList修改节点图标和按钮样式
转载: https://documentation.devexpress.com/#WindowsForms/DevExpressXtraTreeListTreeList_CustomDrawNode ...
- TreeView查获节点并选中节点
TreeView查获节点并选中节点如果有多个节点则会继续查找下一个节点 支持关键字搜索 private void SearchNodes(string SearchText, TreeNode Sta ...
随机推荐
- C# 获取路径中文件名、目录、扩展名等
string path = "C:\\dir1\\dir2\\foo.txt"; string str = "GetFullPath:" + Path.GetF ...
- 安装ImageMagick扩展出现configure: error: not found. Please provide a path to MagickWand-config or Wand- config program
安装ImageMagick扩展报错: checking ImageMagick MagickWand API configuration program... checking Testing /u ...
- Git关联远程GitHub仓库
一.本地安装GIT版本控制软件 二.配置Git,设置用户信息 git config --global user.name "jack" git config --global us ...
- swift从0加到1000(不包括1000)的五种写法
用了while, do...while, for in, for in ... { temp += i i++ } println(temp) do { temp2 += j j++ } ) prin ...
- (C语言)char类型与int类型相加
#include <stdio.h> int main(void) { ; ; int c = a + b; a += b; printf("c=%d",c); //p ...
- Coursera《machine learning》--(2)单变量线性回归(Linear Regression with One Variable)
本笔记为Coursera在线课程<Machine Learning>中的单变量线性回归章节的笔记. 2.1 模型表示 参考视频: 2 - 1 - Model Representation ...
- 应用git(SSH设置)
git配置完成email和user后,才可以生成SSH Key. $ git config --global user.name "自定义名称" $ git config --gl ...
- tyvj P1075 - 硬币游戏 博弈DP
P1075 - 硬币游戏 From price Normal (OI)总时限:10s 内存限制:128MB 代码长度限制:64KB 背景 Background 农民John的牛喜欢玩 ...
- websocket nodejs实例
http://blog.sina.com.cn/s/blog_49cc837a0101aljs.html http://blog.sina.com.cn/s/blog_49cc837a0101a2q3 ...
- [topcoder]CoinReversing
http://community.topcoder.com/stat?c=problem_statement&pm=11473&rd=14543 简单的概率题.那道题想了想就出来了.每 ...