(self,menu,dict)
return dict
Create a pulldown in var from the info in dict
Create a pulldown in var from the info in dict
Create a pulldown in var from the info in dict
def create_pulldown(self,menu,dict):
        """ Create a pulldown in var from the info in dict  """

        var = Menu(menu,tearoff=0)
        items = dict.keys()
        #items.sort()
        for item in items:
            if item[-3:]=='sep':
                var.add_separator()
            else:
                # Do we have a command?
                command=None
                if 'cmd' in  dict[item]:
                    command=dict[item]['cmd']

                # Put the command in there
                if 'sc' in dict[item]:
                    var.add_command(label='%-25s %9s' %(item[2:],dict[item]['sc']),command=command)
                else:
                    var.add_command(label='%-25s' %(item[2:]),command=command)
        dict['var']=var
        return dict
def create_pulldown ( self , menu , dict ) : var = Menu ( menu , tearoff = 0 ) items = dict . keys ( ) #items.sort() for item in items : if item [ - 3 : ] == 'sep' : var . add_separator ( ) else : # Do we have a command? command = None if 'cmd' in dict [ item ] : command = dict [ item ] [ 'cmd' ] # Put the command in there if 'sc' in dict [ item ] : var . add_command ( label = '%-25s %9s' % ( item [ 2 : ] , dict [ item ] [ 'sc' ] ) , command = command ) else : var . add_command ( label = '%-25s' % ( item [ 2 : ] ) , command = command ) dict [ 'var' ] = var return dict