I have an application that makes use of the ListFi开发者_高级运维eld component. As items are clicked on in the ListField, I remove the ListField from the manager and add in other managers.
My problem is that the click "event" is being passed to other fields that automatically get focus as a result of the ListField has been removed. So far my only away around this has been to make those controls unfocasable during the time I am switching out components.
Is there a neater way of doing this, having to make all my controls unfocasable for this small time seems like a bit of a hack. Any suggestions welcome.
Note: in my ListField's navigationClick method I am returning True.
You can also try Manager.replace. Remember to prepare both fields before that: remove listeners from old field, add listeners to new field.
What about changing the order of events:
- Add new managers.
- Set focus where you want it to go.
- Remove old manager.
精彩评论