PEATDB/Tables.py
def adjust_colWidths(self):
        """Optimally adjust col widths at start to accomodate the longest entry"""
        try:
            fontsize=self.celltextsizevar.get()
        except:
            fontsize=11
        scale = 8.5 # +fontsize/10

        for col in range(self.cols):
            width = self.model.getlongestEntry(col) * scale
            #print 'comparing', width,  self.maxcellwidth
            if width >= self.maxcellwidth:
                width = self.maxcellwidth
            elif width < self.cellwidth:
                width = self.cellwidth
            colname=self.model.getColumnName(col)
            self.model.columnwidths[colname]=width
        return
Optimally adjust col widths at start to accomodate the longest entry
Optimally adjust col widths at start to accomodate the longest entry
Optimally adjust col widths at start to accomodate the longest entry
def adjust_colWidths(self):
        try:
            fontsize=self.celltextsizevar.get()
        except:
            fontsize=11
        scale = 8.5 
        for col in range(self.cols):
            width = self.model.getlongestEntry(col) * scale
            if width >= self.maxcellwidth:
                width = self.maxcellwidth
            elif width < self.cellwidth:
                width = self.cellwidth
            colname=self.model.getColumnName(col)
            self.model.columnwidths[colname]=width
        return
def adjust_colWidths ( self ) : try : fontsize = self . celltextsizevar . get ( ) except : fontsize = 11 scale = 8.5 for col in range ( self . cols ) : width = self . model . getlongestEntry ( col ) * scale if width >= self . maxcellwidth : width = self . maxcellwidth elif width < self . cellwidth : width = self . cellwidth colname = self . model . getColumnName ( col ) self . model . columnwidths [ colname ] = width return
Optimally adjust col widths at start to accomodate the longest entry
Optimally adjust col widths at start to accomodate the longest entry
"""Optimally adjust col widths at start to accomodate the longest entry""" # +fontsize/10 #print 'comparing', width,  self.maxcellwidth
self