Ejemplo n.º 1
0
class DirSelectBox(tix.DirSelectBox):
    def __init__(self, master, name, cnf={}, **kw):
        super().__init__(master, cnf, **kw)
        self.settings = Settings(name=name, parent=master.settings)
        self.settings.__setattr__(name, self.__get_set)

    def __get_set(self, value=None):
        if value:
            self.selection.set(value)
        else:
            return self.selection.get()
Ejemplo n.º 2
0
class Control(tix.Control):
    def __init__(self, master, name, cnf={}, **kw):
        super().__init__(master, cnf, **kw)
        self.settings = Settings(name=name, parent=master.settings)
        self.settings.__setattr__(name, self.__get_set)

    def __get_set(self, value=None):
        if value:
            self.entry.delete(0, 'end')
            self.entry.insert('end', value)
        else:
            return self.entry.get()