def __init__(self, parent, entry_type: str='<STR_LIT:float>',<EOL>callback: callable=None, **options):
self._parent = parent<EOL>super().__init__(self._parent)<EOL>sb_options = options.copy()<EOL>if entry_type == '<STR_LIT:str>':<EOL><INDENT>self._var = tk.StringVar()<EOL><DEDENT>elif entry_type == '<STR_LIT:int>':<EOL><INDENT>self._var = tk.IntVar()<EOL><DEDENT>elif entry_type == '<STR_LIT:float>':<EOL><INDENT>self._var = tk.DoubleVar()<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>sb_options['<STR_LIT>'] = self._var<EOL>self._spin_box = tk.Spinbox(self, **sb_options)<EOL>self._spin_box.grid()<EOL>if callback is not None:<EOL><INDENT>def internal_callback(*args):<EOL><INDENT>try:<EOL><INDENT>callback()<EOL><DEDENT>except TypeError:<EOL><INDENT>callback(self.get())<EOL><DEDENT><DEDENT>self._var.trace('<STR_LIT:w>', internal_callback)<EOL><DEDENT>
Constructor for SmartSpinBox