tuikit/widgets/textbox.py
changeset 118 8c7970520632
parent 113 6796adfdc7eb
child 119 dd91747504dd
equal deleted inserted replaced
117:8680c2333546 118:8c7970520632
    82         if ev.char and not ev.keyname:
    82         if ev.char and not ev.keyname:
    83             self.add_char(ev.char)
    83             self.add_char(ev.char)
    84             self.move_right()
    84             self.move_right()
    85             return True
    85             return True
    86 
    86 
    87     def on_mousedown(self, ev):
    87     def mousedown_event(self, ev):
    88         y = ev.wy
    88         y = ev.pos.y
    89         x = min(ev.wx, len(self._lines[y]))
    89         x = min(ev.pos.x, len(self._lines[y]))
    90         self._cursor.update(x=x, y=y)
    90         self._cursor.update(x=x, y=y)
    91         self.redraw()
    91         #self.redraw()
    92 
    92 
    93     def on_mousewheel(self, ev):
    93     def on_mousewheel(self, ev):
    94         if ev.button == 4:
    94         if ev.button == 4:
    95             # wheel up
    95             # wheel up
    96             self.emit('scrollreq', -5)
    96             self.emit('scrollreq', -5)