本文介绍了Delphi中与Treeview的Editbox关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好
我尝试在delphi 2010中编写像字典一样的programm,但是当我在editbox中键入我在treeview点头文本中键入的文本搜索字符串并自动选择该字符时,或者当我键入char``A,a''treeview时,我在Programm中遇到问题返回以该char开头的节点文本
我使用搜索"按钮编写程序,但我必须键入完整的单词以选择该文本,我在做什么?
hello
i try to write programm in delphi 2010 that like an dictionary but i have problem in my programm when i type in editbox my typed text search string in treeview nod text and automatically select that or when i type char ''A,a'' treeview return node text that start with that char
i write program with Search button but i must type complete word to select that text what i was doing ?
推荐答案
node.text
与您的搜索字词进行了精确比较.
你应该做这样的事情:
with your search term exactly.
you should do something like this :
for cnt := 0 to TreeView1.Items.Count - 1 do
if Pos(lowercase(Search.Text), lowercase(TreeView1.Items[cnt].Text))>0 then
Node.Selected = true;
这篇关于Delphi中与Treeview的Editbox关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!