[Urwid] ListBox, focus and colors
Bernardo Torres
bernardojts at gmail.com
Fri Apr 28 20:42:22 EDT 2006
AMAZZZZINGG!!
Thanks dude!
On 4/28/06, Ian Ward <ian at excess.org> wrote:
> Bernardo Torres wrote:
> > I used this and played with keypress, but got weird results. Using
> > solely the example doesn't seem to work. I made a mini example to test
> > it (attached).
> ...
> > def main(self):
> > self.size = self.ui.get_cols_rows()
> > while True:
> > self.canvas = self.box.render(self.size)
> change to:
> self.canvas = self.box.render(self.size, focus=True)
>
> > self.ui.draw_screen(self.size, self.canvas)
> > keys = None
> > while not keys:
> > keys = self.ui.get_input()
> > for k in keys:
> > if "q" in k or "Q" in k:
> > break
> > elif "window resize" in k:
> > cols, rows = self.ui.get_cols_rows()
> change to:
> self.size = self.ui.get_cols_rows()
> (or resizing the screen won't work)
>
> > self.box.keypress(self.size, k)
> > i = Interface()
> >
>
> Ian
>
>
> _______________________________________________
> Urwid mailing list
> Urwid at lists.excess.org
> http://lists.excess.org/mailman/listinfo/urwid
>
>
More information about the Urwid
mailing list