tuikit/widgets/textfield.py
changeset 112 ce2e67e7bbb8
parent 111 b055add74b18
child 113 6796adfdc7eb
--- a/tuikit/widgets/textfield.py	Wed Sep 03 19:14:43 2014 +0200
+++ b/tuikit/widgets/textfield.py	Wed Sep 03 19:17:04 2014 +0200
@@ -21,6 +21,8 @@
         self.curspos = len(value)      # position of cursor in value
         self.ofs = 0      # position of value beginning on screen
 
+        self._cursor_visible = True
+
     def resize(self, w, h):
         self.tw = self.width - 2
 
@@ -43,7 +45,7 @@
                 c = '>'
             buffer.putch(c, self.width-1, 0)
 
-            self._cursor = (1 + self.curspos - self.ofs, 0)
+            self._cursor.update(1 + self.curspos - self.ofs, 0)
 
     def keypress_event(self, ev):
         consumed = True