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..