On Mon, Jan 28, 2013 at 6:26 PM, Jason But <[email protected]> wrote:
> 1) The program works fine ONLY if the applications executed in the terminal
> widget do NOT require any keyboard input.
>
> 2) The two widgets above are in a Columns, if O use a "cols.focus_col = 1"
> (giving focus to the terminal widget), then all of a sudden any applications
> that require keyboard input start working as the terminal is the selected
> widget. However, because the listbox has lost focus, the currently selected
> item is no longer highlighted
>
> Any ideas on how I can achieve both?

Don't use the focus_map AttrMap setting for the ListBox items. You
could just put an AttrMap(task, 'active task) around the task that is
active, maybe also add some text like an arrow or something to help
people with trouble distinguishing colours.  You can continue forcing
the ListBox to change focus when the task changes (to keep the active
task visible within the ListBox)

You should also make the ListBox not selectable by wrapping it with a
WidgetDisable() so that the user doesn't accidentally move focus away
from the Terminal.

Ian

_______________________________________________
Urwid mailing list
[email protected]
http://lists.excess.org/mailman/listinfo/urwid

Reply via email to