Package tkintertable :: Module Custom
[hide private]
[frames] | no frames]

Source Code for Module tkintertable.Custom

 1  #!/usr/bin/env python 
 2  """ 
 3      Custom Table sub-class illustrate table functionality. 
 4      Created January 2008 
 5      Copyright (C) Damien Farrell 
 6   
 7      This program is free software; you can redistribute it and/or 
 8      modify it under the terms of the GNU General Public License 
 9      as published by the Free Software Foundation; either version 2 
10      of the License, or (at your option) any later version. 
11   
12      This program is distributed in the hope that it will be useful, 
13      but WITHOUT ANY WARRANTY; without even the implied warranty of 
14      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
15      GNU General Public License for more details. 
16   
17      You should have received a copy of the GNU General Public License 
18      along with this program; if not, write to the Free Software 
19      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
20  """ 
21   
22  from Tables import TableCanvas, ColumnHeader 
23   
24 -class MyTable(TableCanvas):
25 """Sub-class of Tablecanvas, with some changes in behaviour to make 26 a customised table - just an example"""
27 - def __init__(self, parent=None, model=None):
28 TableCanvas.__init__(self, parent, model) 29 self.cellbackgr = '#FFFAF0' 30 self.entrybackgr = 'white' 31 32 self.selectedcolor = 'yellow' 33 self.rowselectedcolor = '#B0E0E6' 34 self.multipleselectioncolor = '#ECD672' 35 36 return
37