EhLib中的MemTableEh的TreeList如何使 找进销存系统
2楼: 1.拖放一个 TImageList,给 ImageList 加上图标。
2.双击 DBGridEh,添加需要的字段。
3.点击需要图标的字段,设其 ImageList 属性设为刚才添加的 TImageList。
4.需要添加图标的字段的 OnGetCellParams 事件中设定图标序号:
if MemTableEh1.TreeNodeExpanded
then Params.ImageIndex := 1 //节点展开的图标
else Params.ImageIndex := 2;//节点收起的图标 如进销存系统
3楼: 但是点击图标时会提提“List Index out of bounds(0)”
4楼: 但是点击图标时会提示“List Index out of bounds(0)” 这是什么原因????
5楼: 我按下面这个方法做时
1.拖放一个 TImageList,给 ImageList 加上图标。
2.双击 DBGridEh,添加需要的字段。
3.点击需要图标的字段,设其 ImageList 属性设为刚才添加的 TImageList。
接下去运行,选择图标所在的表格中就会提示出“List Index out of bounds(0)”对话框 这是什么原因????
4.需要添加图标的字段的 OnGetCellParams 事件中设定图标序号:
if MemTableEh1.TreeNodeExpanded
then Params.ImageIndex := 1 //节点展开的图标
else Params.ImageIndex := 2;//节点收起的图标
可以出现我所要的图标
6楼: 接受答案了.