文字框清除 [英] textbox clear

查看:93
本文介绍了文字框清除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果要清除文本框是txtfname.text =",那么vb.net中的组合框和datetimepicker怎么样?

cboPackage.items.clear它可以工作,但是如何使组合牛中的项目再次填充.

if to clear a text box is txtfname.text = "" then how about the combobox and the datetimepicker in vb.net?

cboPackage.items.clear it works but how to make the items in combo ox fill again.

推荐答案

组合框有几种.你在说哪一个?

我将从ComboBox.SelectedItem = null或类似的内容开始.想象一下,您可以使用DateTimePicker做类似的事情.当然,您可以通过快速的Google搜索找到所有答案.
There are several kinds of comboboxes. Which one are you talking about?

I would start with ComboBox.SelectedItem = null or something like that. I Imagine you can do something similar with the DateTimePicker. Of course, you could probably find all your answers with a quick google search.


组合框-objCombo.items.Clear()
日期选择器-请参见此处 [
Combobox - objCombo.items.Clear()
Datepicker - see here[^].


如果不是数据绑定控件,请调用ComboBox1.Items.Clear组合框
我不确定Datetimepicker是否具有这样的属性.也许您可以设置选定的日期而不是清除它.
If it is not a databound control call ComboBox1.Items.Clear for Combobox
I am not sure whether Datetimepicker has such a property. May be you can set the selected date instead of clearing it.


这篇关于文字框清除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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