def __init__(self, master, width, callback=None):
        """
        master  : the widget this gets placed inside
        """        # Define a StringVar, connect it to the callback, if there is one
        self.val = tk.StringVar()
        if callback is not None:
            self.val.trace('w', callback)
        tk.Entry.__init__(
            self,
            master,
            textvariable=self.val,
            width=width
        )
        # get globals
        g = get_root(self).globals
        self.config(fg=g.COL['text'], bg=g.COL['main'])
        # Control input behaviour.
        self.bind('<Enter>', lambda e: self.focus())
def __init__ ( self , master , width , callback = None ) : self . val = tk . StringVar ( ) if callback is not None : self . val . trace ( 'w' , callback ) tk . Entry . __init__ ( self , master , textvariable = self . val , width = width ) g = get_root ( self ) . globals self . config ( fg = g . COL [ 'text' ] , bg = g . COL [ 'main' ] ) self . bind ( '<Enter>' , lambda e : self . focus ( ) )
master  : the widget this gets placed inside