def __init__(self, master, choices=[], default=None, direction='down', arrowimage='default', **kwargs):
    style = {'relief': 'groove', 'bg': 'white'}
    style.update(kwargs)
    tk.Label.__init__(self, master, **style)
    if (direction not in ('down', 'up')):
        raise Exception('Direction must be either down or up')
    self.direction = direction
    self.choices = choices
    self.entry = tk.Entry(self, bg=style['bg'], borderwidth=0)
    self.entry.pack(side='left', fill='y')
    if (default != None):
        self.entry.insert(0, default)
    if (arrowimage == 'default'):
        arrowimage = tk.PhotoImage(file='dropdown.gif')
    else:
        pass
    self.arrow = tk.Label(self, bg=style['bg'], image=arrowimage)
    self.arrow.img = arrowimage
    self.arrow.pack(side='right')
    self.arrow.bind('<Button-1>', self.dropdown)
def __init__(self, master, choices=[], default=None, direction='down', arrowimage='default', **kwargs):
    style = {'relief': 'groove', 'bg': 'white'}
    style.update(kwargs)
    tk.Label.__init__(self, master, **style)
    if (direction not in ('down', 'up')):
        raise Exception('Direction must be either down or up')
    self.direction = direction
    self.choices = choices
    self.entry = tk.Entry(self, bg=style['bg'], borderwidth=0)
    self.entry.pack(side='left', fill='y')
    if (default != None):
        self.entry.insert(0, default)
    if (arrowimage == 'default'):
        arrowimage = tk.PhotoImage(file='dropdown.gif')
    else:
        pass
    self.arrow = tk.Label(self, bg=style['bg'], image=arrowimage)
    self.arrow.img = arrowimage
    self.arrow.pack(side='right')
    self.arrow.bind('<Button-1>', self.dropdown)