arrow keys between buttons now work.
authorJohn Ladan <jladan@uwaterloo.ca>
Sun, 1 Apr 2012 18:47:00 +0000 (14:47 -0400)
committerJohn Ladan <jladan@uwaterloo.ca>
Sun, 1 Apr 2012 18:47:00 +0000 (14:47 -0400)
form.py

diff --git a/form.py b/form.py
index 2bef3a6..2ac3f94 100644 (file)
--- a/form.py
+++ b/form.py
@@ -165,7 +165,9 @@ class formWindow:
             if self.bt==-1:
                 self.mvCursor(-1)
             else:
+                self.unHighlight()
                 self.bt=0
+                self.highlight()
         elif ch==curses.KEY_HOME:
             if self.bt==-1:
                 self.mvCursor(-len(self.entries[self.hl]))
@@ -173,7 +175,9 @@ class formWindow:
             if self.bt==-1:
                 self.mvCursor(+1)
             else:
+                self.unHighlight()
                 self.bt=1
+                self.highlight()
         elif ch==curses.KEY_END:
             if self.bt==-1:
                 self.mvCursor(+len(self.entries[self.hl]))