如何清除表单字段以添加到ListBox? [英] How do I clear form fields to add to a ListBox?

查看:74
本文介绍了如何清除表单字段以添加到ListBox?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用wpf格式在VB Express 2008中创建了一个列表框。

解决方案

您只需在表单上添加一个按钮即可将相应类型的新项添加到基础绑定列表(具有一些适当的默认值),然后将列表框上的selectedindex设置为新创建的项?


标记


I have created a listbox in VB Express 2008 using a wpf form.

解决方案

You could just add a button on your form that adds a new item of the appropriate type to the underlying bound list (with some appropriate defaults), then sets the selectedindex on the listbox to the newly-created item?

Mark


这篇关于如何清除表单字段以添加到ListBox?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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