将数据保存在列表框中 [英] saving the datas in listbox

查看:65
本文介绍了将数据保存在列表框中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我创建了一个文本框,一个列表框和一个保存按钮。在enebox nubmer或文本框中的文本,然后单击保存按钮,它应该在列表框中查看。



问候

Balamurugan

Hi,
I have created one textbox one list box and one save button.after enetring nubmer or text in textbox and clicking save button it should view in listbox.

Regards
Balamurugan

推荐答案

听起来微不足道。你有什么尝试?列表框有一个Items集合。这有一个Add方法。
Sounds trivial. What have you tried ? The list box has an Items collection. That has an Add method.


这是在列表框中添加的编码。

listbox1.Items.Add(textbox1.Text);
This is the coding for adding in listbox.
listbox1.Items.Add(textbox1.Text);


这篇关于将数据保存在列表框中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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