开发者

Flex Combobox: Cancel Select

开发者 https://www.devze.com 2022-12-12 12:49 出处:网络
I\'ve made an itemrenderer for the combobox control that shows a button next to the label. If a user clicks this button, the item gets removed from the dataprovider. Works so far.

I've made an itemrenderer for the combobox control that shows a button next to the label. If a user clicks this button, the item gets removed from the dataprovider. Works so far. When he 开发者_StackOverflowselects an item, the combobox closes, that's ok. But I don't want it to close when he removes an item.

So is there a way to cancel the change event? I have tried several things, but to no avail.

I have to use the combobox for layout reasons, don't have enough space to use listboxes...

Thanks for your help.


In your custom itemrenderer , on mouse down handler stop Immediate Propogation

event.stopImmediatePropogation();


In your custom item renderer, try canceling the event in your button's click handler.

event.stopImmediatePropogation()

0

精彩评论

暂无评论...
验证码 换一张
取 消