for example dropdown box contain three things Simon,Jaison,Rahul..if you click Jaison will generate jaison as a text,,or Simon will generate Simon as a text
点击时如何从下拉框生成文本
原标题:
最佳回答
你的问题有些不清楚,但如果你试图从当前选定的项目中获取字符串(当选择发生变化时),那么...
处理SelectedIndexChanged
事件:
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
string selectedText = comboBox1.SelectedItem.ToString();
// Do whatever you want to do with it, for example...
label1.Text = selectedText;
}
问题回答
暂无回答
相关问题
热门标签
- winforms
- combobox
- fogbugz
- java
- date
- internationalization
- asp.net
- iis
- url-rewriting
- urlrewriter
- c#
- enums
- ocaml
- haxe
- algorithm
- string
- viewstate
- .net
- c++
- c
- symbol-table
- mysql
- database
- postgresql
- licensing
- migration
- vb.net
- vb6
- declaration
- vb6-migration
- python
- psycopg2
- backup
- vmware
- virtualization
- gnu-screen
- authentication
- desktop
- excel
- xll
- cultureinfo
- regioninfo
- oracle
- client
- session
- download
- html
- virtual
- constructor
- scenarios
- perl
- full-text-search
- javascript
- ajax
- testing
- oop
- inheritance
- vim
- encapsulation
- information-hiding