On 09-05-2019 18:07, Ron Tarrant wrote:
Hi Mike,
ComboBoxText's signal, onChanged, responds to both key events and mouse selection events, but I'd like write a callback that responds only to the mouse.
What I have so far [see reportSelected() below] uses writeln(getActiveText()) to illustrate harnessing this signal and it works as I'd like when mouse-selecting from the list. But typing into the Entry results in:
M
Mo
Mon
Mond... etc.being echoed to the terminal and it looks messy, so I'm thinking there must be a way to filter out key presses so that no matter what user action triggers the signal, I can weed out the events I don't want to respond to. But to do that, I need access to the Event and I can't figure out how to do that from within a callback that isn't passed an Event object. After a few hours of searching and experimenting, I'm out of ideas. Can you advise, please?
Here's the class I'm working on:
I cant sem to find a way to do that.