Skip to main content

Extendable table class for Tkinter

Project description

ABOUT

There are various libraries that extend tkinter functionality, such as Pmw, but there is currently no useful and extendable table class for tkinter. We have developed such a class out of the need to use one in our protein engineering (PEAT) application and it is provided here under the GPL license for general use. A sample application using these classes is included in the distribution. This shows a possible implementation. Pmw is required to use this application. Otherwise the classes are based purely on tkinter.

HOMEPAGE

http://code.google.com/p/tkintertable/

INSTALLATION

Download packages at http://code.google.com/p/tkintertable/downloads/list

Can also be installed using setuptools:

sudo easy_install tkintertable

SUBVERSION

You can checkout the current svn version using

svn co http://tkintertable.googlecode.com/svn/trunk/ tkintertable

USAGE

The class utilises the concept of table view<->model from java swing. The TableCanvas class is the graphical element that handles all the user interaction, GUI changes, formatting etc. This class inherits from tkinter canvas, and we should put all basic table functionality in this base class. However, in practice we really should sub-class this and add any specialist functionality to the subclass, either by overriding the required parent class methods or adding extra ones. Each tablecanvas has a model associated with it, this class handles all the data, updating, sorting and so on. Again, the base class is called TableModel and you sub-class this for specific uses. Example: To create a basic table, only the following 4 lines are needed. We can also create a model from some data, then use that model to initiate the table. The data, a dictionary, will be appropriate to that model of course.

tframe = Frame(master) tframe.pack() table = TableCanvas(tframe) table.createTableFrame()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tkintertable-1.0.1.tar.gz (353.2 kB view details)

Uploaded Source

File details

Details for the file tkintertable-1.0.1.tar.gz.

File metadata

  • Download URL: tkintertable-1.0.1.tar.gz
  • Upload date:
  • Size: 353.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for tkintertable-1.0.1.tar.gz
Algorithm Hash digest
SHA256 56f4a6e011a02356a4991cf89d68b66943792482c64afedf2bbd420039fcccb2
MD5 9cc5bffdf4591e25cb9cfba4d01253fa
BLAKE2b-256 381e8abf81459b11d51d626cda9e4dc8683d98655c7814d587981a0630bc29ba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page