[Urwid] ListBox selected item not displayed
ian at excess.org
Thu Oct 4 21:10:27 EDT 2007
John Powell wrote:
> ya.. well.. never mind
> view.render(size, focus=True) was the parameter I was missing. I still
> don't fully understand the significance of that however it works well
> enough for now.
> If anyone would care to enlighten me as to why this must be set please
> do so. More specifically why would you want it not set?
It's only interesting if you're writing your own widget classes. It has
a default of False for historical reasons: at one point there was no
focus parameter to render(), and it meant there was less code for me to
change by giving it a default value.
I am planning to add a generic main loop that most applications will be
able to use to reduce the boiler-plate repetition and potential for
bugs, such as forgetting this parameter.
More information about the Urwid