Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.94 KB | None | 0 0
  1.    def on_vscrollbar_event_after(self, vscrollbar, event, anchor):
  2.         """Catches CodeBox Vertical Scrollbar Movements"""
  3.         if not self.dad.user_active or self.curr_codebox_anchor != anchor: return False
  4.         if self.dad.codebox_auto_resize and event.type == gtk.gdk.EXPOSE:
  5.             curr_v = vscrollbar.get_value()
  6.             #print curr_v+vscrollbar.get_adjustment().page_size, vscrollbar.get_adjustment().upper
  7.             if curr_v and ((curr_v+vscrollbar.get_adjustment().page_size) >= (vscrollbar.get_adjustment().upper-20)) and (vscrollbar.get_adjustment().page_size > curr_v):
  8.                 # 1) the scrollbar is visible
  9.                 # 2) we are at the scrolling end
  10.                 # 3) the scrolling area is little, this step will probably cause the scrollbar to hide again
  11.                 self.curr_v = curr_v
  12.                 if not self.dad.codebox_sentinel_id: self.dad.codebox_sentinel_start()
  13.         return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement