Issues on focus with composites and their child widgets
posted 7 years ago
I have been trying this for days and cannot figure out how I can achieve what I want. I have two composites, every one of them has a button inside.
What I want to do is: when user switches from one button to another, I want to detect focus events concerning their parent composites, so I can can take appropriate actions.
The problem is: once I click on button1 in composite1, composite1 gains focus and then lost it, and button1 gains focus. This is good, at least composite1 can detect focus events. Now if I click on button2 in composite2, button1 lost focus, button2 gains focus, composite2 cannot detect any focus events. After this, neither of composites can detect focus events. How can I make composites instead of their child widgets detect their focus events?
Here is a sample printout: