我在将子级插入Treeview时遇到问题. [英] i have a problem in inserting child to treeview.
问题描述
大家好,
我的程序是leitner box.我有一个带有某些节点的树形视图.当我向数据库中添加一个单词时,这个单词作为其子级添加到树形视图节点中.但是当我关闭程序并停止调试时,下次我打开并调试program.tree视图为空.为什么?????.my代码在这里:
TreeView1.Nodes.Find("Node36", True)(0).Nodes.Add("G1", txtw.Text)
txtw.text是我写单词的地方.
node36是words的父节点.这意味着我想将此单词作为子代添加.
http://www.up.98ia.com/images/t61epg1kwk6dpajueoun.png
这是显示mt树视图的链接.
Hello All,
my program is leitner box.i have a tree view with some nodes.when i add a word to database,this word add to tree view node as its child.but when i close my program and stop debuging it,at next time that i open and debug program.tree view is empty.why?????.my code is here:
TreeView1.Nodes.Find("Node36", True)(0).Nodes.Add("G1", txtw.Text)
txtw.text is where i write the word.
node36 is the parent node of words.it means i want to add words as childs if this parent.
http://www.up.98ia.com/images/t61epg1kwk6dpajueoun.png
this is link that shows mt tree view.
推荐答案
TreeView为空有很多可能的原因!
让我们从一个简单的例子开始:启动程序时,您是否在其中添加了任何内容?你检查了吗?
There are so many possible reasons why your TreeView is empty!
Let''s start with the simple one: When you start your program, do you put anything in it? Have you checked?
这篇关于我在将子级插入Treeview时遇到问题.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!