diff --git a/mytwitter.py b/mytwitter.py index c9ee053..6caa2dc 100755 --- a/mytwitter.py +++ b/mytwitter.py @@ -60,10 +60,12 @@ class TwitWindow: ### Set up bindings # Bind scrollwheel to move the tweets, as well as page up/down - self.tkroot.bind_all("", self.scroll_wheel); - self.tkroot.bind_all("", self.scroll_wheel); - self.tkroot.bind_all("", self.page_up); - self.tkroot.bind_all("", self.page_down); + self.tkroot.bind_all("", self.scroll_wheel) + self.tkroot.bind_all("", self.scroll_wheel) + self.tkroot.bind_all("", self.line_up) + self.tkroot.bind_all("", self.line_down) + self.tkroot.bind_all("", self.page_up) + self.tkroot.bind_all("", self.page_down) # Bind any key in the update_entry to adjust the counter, except return self.update_entry.bind('', self.char_counter) @@ -123,6 +125,14 @@ class TwitWindow: self.tweet_view.yview('scroll', 15, 'units'); + def line_up(self, event): + self.tweet_view.yview('scroll', -5, 'units'); + + + def line_down(self, event): + self.tweet_view.yview('scroll', 5, 'units'); + + def char_counter(self, event): new_count = str(len(self.update_entry.get())) + "/140" self.update_count.config(text=new_count)