[Urwid] mouse_event() confusion
Ian Ward
ian at excess.org
Sun Jul 23 12:58:24 EDT 2006
Rebecca Breu wrote:
> The problem: When I put the MyListBox into a Columns widget together
> with another selectable widget, and that other widget is focused, then
> right-clicking into the MyListBox doesn't change the focus (but I can
> hear the beep). Whereas, when the focus is already in the MyListBox,
> a right-click beeps and changes the focus as expected.
Yes, right now composite widgets like Columns don't change their focus
unless it is button 1 that was pressed, but they pass the mouse events
to the appropriate widget to be handled..
I could change that behavior to change focus on any button press event.
The current behavior was just a guess at what people would want -- my
guess could be wrong.
> Another thing I noticed is that the mouse_event() functions seem to
> return False all of the time. I understand that they should return True
> if a key was handled? :-/
It returns True when a button is clicked but it might not return True
for most focus change events, and for events that are ignored, like
releases and drag events.
Can you be more specific about which case is returning False when you
think is should be True?
Ian
More information about the Urwid
mailing list