I'm new to urwid. I'm trying to create a simple dialog as follows:
import urwid
f1 = urwid.Edit("Field 1: ")
f2 = urwid.Edit("Field 2: ")
f3 = urwid.Edit("Field 3: ")
ok = urwid.Button("OK")
cancel = urwid.Button("Cancel")
gf = urwid.GridFlow([ok, cancel], 10, 10, 0, "center")
pile = urwid.Pile([
f1,
f2,
f3,
urwid.Divider(),
gf
])
fill = urwid.Filler(pile, valign="top")
loop = urwid.MainLoop(fill)
loop.run()
I want to be able to disable the OK button depending on what's being
input. By "disable" I stopping the cursor from moving it to it when I
use the arrow keys to move focus around.
Is there an easy way to do this?
Thanks,
Yasir
No virus found in this outgoing message.
Checked by AVG - www.avg.com
Version: 8.5.426 / Virus Database: 270.14.96/2549 - Release Date: 12/06/09
19:37:00
_______________________________________________
Urwid mailing list
[email protected]
http://lists.excess.org/mailman/listinfo/urwid