# -*- mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*- # Wrapped from /disk/dos/k/Tixapps/src/Widgets/Feedback.tcl import Tkinter, Tix, ObjTix class TIDEFeedback(ObjTix.Widget,ObjTix.DialogShell): ''' A little feedback widget, used to indicate progress ''' def __repr__ (self): return "" % self._w def __init__(self, master, name='', cnf={}, **kw): self.master = master self.tk = master.tk self.tk.eval('if {[info commands TIDEFeedback] == ""} {auto_load TIDEFeedback}') if kw: cnf = Tkinter._cnfmerge((cnf, kw)) static = ['options'] # This should be staticOptions, but I don't see why # you would ever want to use configure during creation. for x in self.tk.split(self.tk.eval('set TIDEFeedback(options)')): static.append(x[1:]) ObjTix.Widget.__init__(self, master, 'TIDEFeedback', static, cnf) def destroy (self): retval = self.tk.call(self._w, 'destroy') def grab (self): retval = self.tk.call(self._w, 'grab') def reset (self): retval = self.tk.call(self._w, 'reset') def step (self, inc=1): retval = self.tk.call(self._w, 'step', inc) return self._gCoerce(retval, 'integer') def set_title (self, title): retval = self.tk.call(self._w, 'set_title', title) # For Python >= 2.2.1 __slots__ = ['barcolor','barheight','barwidth','steps','title'] if __name__ == '__main__': root = Tix.Tk() # Call your toplevel here