#NEWLINE# def setColumnsSortable( self , treeColIsInt = False , startUnsorted = False , initialSortCol = '#0' , initialSortDirForward = True ) : #NEWLINE# #INDENT# if ( hasattr ( self , 'lastSortColumn' ) and self . lastSortColumn ) : #NEWLINE# #INDENT# self . treeView . heading ( self . lastSortColumn , image = self . sortImages [ 2 ] ) #NEWLINE# #UNINDENT# self . lastSortColumn = ( None if startUnsorted else initialSortCol ) #NEWLINE# self . lastSortColumnForward = initialSortDirForward #NEWLINE# self . treeColIsInt = treeColIsInt #NEWLINE# if ( not hasattr ( self , 'sortImages' ) ) : #NEWLINE# #INDENT# self . sortImages = ( PhotoImage ( file = os . path . join ( self . modelXbrl . modelManager . cntlr . imagesDir , 'columnSortUp.gif' ) ) , PhotoImage ( file = os . path . join ( self . modelXbrl . modelManager . cntlr . imagesDir , 'columnSortDown.gif' ) ) , PhotoImage ( ) ) #NEWLINE# #UNINDENT# for col in ( ( '#0' , ) + self . treeView [ 'columns' ] ) : #NEWLINE# #INDENT# self . treeView . heading ( col , command = ( lambda c = col : self . sortColumn ( c ) ) ) #NEWLINE# #UNINDENT# if ( not startUnsorted ) : #NEWLINE# #INDENT# self . treeView . heading ( initialSortCol , image = self . sortImages [ ( not initialSortDirForward ) ] )