BVB Source Codes

DeDRM_tools Show scrolltextwidget.py Source code

Return Download DeDRM_tools: download scrolltextwidget.py Source code - Download DeDRM_tools Source code - Type:.py
  1. #!/usr/bin/env python
  2. # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
  3.  
  4. import Tkinter
  5. import Tkconstants
  6.  
  7. # basic scrolled text widget
  8. class ScrolledText(Tkinter.Text):
  9.     def __init__(self, master=None, **kw):
  10.         self.frame = Tkinter.Frame(master)
  11.         self.vbar = Tkinter.Scrollbar(self.frame)
  12.         self.vbar.pack(side=Tkconstants.RIGHT, fill=Tkconstants.Y)
  13.         kw.update({'yscrollcommand': self.vbar.set})
  14.         Tkinter.Text.__init__(self, self.frame, **kw)
  15.         self.pack(side=Tkconstants.LEFT, fill=Tkconstants.BOTH, expand=True)
  16.         self.vbar['command'] = self.yview
  17.         # Copy geometry methods of self.frame without overriding Text
  18.         # methods = hack!
  19.         text_meths = vars(Tkinter.Text).keys()
  20.         methods = vars(Tkinter.Pack).keys() + vars(Tkinter.Grid).keys() + vars(Tkinter.Place).keys()
  21.         methods = set(methods).difference(text_meths)
  22.         for m in methods:
  23.             if m[0] != '_' and m != 'config' and m != 'configure':
  24.                 setattr(self, m, getattr(self.frame, m))
  25.  
  26.     def __str__(self):
  27.         return str(self.frame)
  28.  
downloadscrolltextwidget.py Source code - Download DeDRM_tools Source code
Related Source Codes/Software:
kcp - KCP - A Fast and Reliable ARQ Protocol 2017-04-08
cloc - cloc counts blank lines, comment lines, and physic... 2017-04-08
nvidia-docker - Build and run Docker containers leveraging NVIDIA ... 2017-04-08
quickstart - Angular 2 QuickStart - source from the documentati... 2017-04-08
jQuery-Autocomplete - Ajax Autocomplete for jQuery allows you to easily ... 2017-04-08
fuckitjs - The Original Javascript Error Steamroller 2017-04-09
eslint-plugin-react - React specific linting rules for ESLint 2017-04-09
husky - 2017-04-09
electron-builder - A complete solution to package and build a ready f... 2017-04-09
jsfeat - JavaScript Computer Vision library. 2017-04-16
flakes - Flakes is an Admin Template Framework. A combinati... 2017-04-15
capstone - Capstone disassembly/disassembler framework: Core ... 2017-04-15
nginx-resources - A collection of resources covering Nginx, Nginx + ... 2017-04-15
utron - A lightweight MVC framework for Go(Golang) 2017-04-15
cfssl - CFSSL: Cloudflare's PKI and TLS toolkit ... 2017-04-15
HandBrake - HandBrake's main development repository ... 2017-04-15
Awesome-Networking - A curated list of awesome networking libraries, re... 2017-04-15
react-sortable-hoc - A set of higher-order components to turn any list ... 2017-04-15
jugglingdb - Multi-database ORM for nodejs: redis, mongodb, mys... 2017-04-15

 Back to top