Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我的 ComboBox 是可编辑的,我如何判断更改事件是来自 TextInput 的更改还是下拉列表的 selectedIndex 的更改?
有没有办法在事件对象中检查这个?
检查selectedIndexComboBox 上的属性——如果您的更改发生在下拉列表中,这将是列表中的索引;否则它将是-1。
selectedIndex
请参阅ComboBox.selectedIndex。