Vb.net(通过texbox搜索在列表框中添加项目) [英] Vb.net (add items in listbox by texbox search)

查看:64
本文介绍了Vb.net(通过texbox搜索在列表框中添加项目)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的先生..
我正在制作像Dictionary一样的软件.....
我想要vb.net中该软件的源代码.问题是我使用了文本框和
该软件中有两个列表框.加载表单时,listbox1会加载许多表单.并且listbox2为空.但是我想当我在文本框中输入任何文本时,在列表框2中添加字母顺序项目(就像当我按"a"然后在列表框2中仅为"a"字母bates [a,ab,aback,abba,船上添加项目时一样) ,能力,和,阿马津,.......等等))和(当我按"b"键时,listbox2仅添加"b"字母标出的项目[球,是,男孩,宽大,大,但,.... etc]),并恰好是"c" ............
先生,请回答我这个问题的解决方案……请.
谢谢......


但请在vb.net(2005)中告诉我解决方案..................
谢谢..........

Dear Sir..
I am making A Software like as Dictionary.....
i want the source code in vb.net for.this software. problem is that i have used a textbox and
two listbox in this software . when form is loaded then listbox1 have many items loaded with form. and listbox2 is empty. but i want when i enter any text in textbox then alphabaticaly items is added in listbox2(like as when i press ''a'' then listbox2 add items only for ''a'' alphabates[a,ab,aback,abba,aboard,ability,and,amazine,.......etc]) and ( when i press ''b'' then listbox2 add items only ''b'' alphabates[ball, be, boy, broad, big, but, ....etc]) and exactly ''c''............
Sir please reply me solution of this problem ......please.
Thanks...............


but tell me solution in vb.net(2005) please.....................
Thanks..........

推荐答案


您可以使用textBox的onkeyup事件.

示例:

< asp:textbox id ="txtObj" runat ="server" onkeyup ="changeValue(this);" />


函数changeValue(obj)
{
document.getElementByID("listboxObj").value = obj.value;
返回false;
}

希望能为您工作.

you can use onkeyup event of the textBox.

Example:

<asp:textbox id="txtObj" runat="server" onkeyup="changeValue(this);" />


function changeValue(obj)
{
document.getElementByID("listboxObj").value=obj.value;
return false;
}

hopes this work for u..


这篇关于Vb.net(通过texbox搜索在列表框中添加项目)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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