简体   繁体   中英

monitor combobox for change vb.net

How can I monitor a ComboBox for changes?

The SelectedIndexChanged event only firnges when selection is changed by choosing a different value from the combobox, I would like to monitor chaes when the selection is manually deleted and no value was chosen.

Thanks in advance!

Easy, simply use the event TextChanged :

Occurs when the Text property value changes.

See the MSDN Documentation about it.

只需扩展组合框类并覆盖SelectedIndexChange事件以满足您的需求。

You can select to Indexchange or Valuechange or Textchange

Then, you can try to put some code. Like record it for every change.

like adding below code to the Valuechange

listbox1.items.add = combobox1.selecteditem

Of course you must made the visible to false

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM