def __init__(self, master=None, cnf={}, **kw): yawTtk.Frame.__init__(self, master, cnf={}, **kw) self.rowconfigure(6, weight=1) # yawTtk.Label(self, padding=2, text="recipientId", background="lightgreen", font=("tahoma", 8, "bold")).grid(row=0, column=0, columnspan=3, padx=4, pady=4, sticky="nesw") self.recipientId = yawTtk.Combobox(self).grid(row=1, column=0, columnspan=3, padx=4, pady=4, sticky="nesw") # yawTtk.Label(self, padding=2, text="vendorField", background="lightgreen", font=("tahoma", 8, "bold")).grid(row=2, column=0, columnspan=3, padx=4, pady=4, sticky="nesw") self.vendorField = yawTtk.Entry(self).grid(row=3, column=0, columnspan=3, padx=4, pady=4, sticky="nesw") # self.amount = AmountFrame(self, padding=(4, 0, 4, 4), address=AddressPanel.address).grid( row=5, column=0, columnspan=3, sticky="nesw") # frame = yawTtk.Frame(self, padding=4, text="Send").grid(row=6, column=0, columnspan=3, sticky="esw") yawTtk.Separator(frame).pack(side="top", fill="x", pady=8) self.button = yawTtk.Button(frame, text="Send").pack(side="right") self.update() self.amount.value.trace("w", self.update)
def __init__(self, master=None, cnf={}, **kw): yawTtk.Frame.__init__(self, master, cnf={}, **kw) self.columnconfigure(0, weight=1) self.rowconfigure(6, weight=1) self.username = yawTtk.StringVar(self, "", "vote.username") # yawTtk.Label(self, padding=2, text="delegate", background="lightgreen", font=("tahoma", 8, "bold")).grid(row=0, column=0, columnspan=3, padx=4, pady=4, sticky="nesw") self.delegate = yawTtk.Combobox(self, values=tuple(d["username"] for d in AddressPanel.candidates), textvariable="vote.username").grid(row=1, column=0, columnspan=3, padx=4, pady=4, sticky="nesw") # frame = yawTtk.Frame(self, padding=4, text="Send").grid(row=6, column=0, sticky="esw") yawTtk.Separator(frame).pack(side="top", fill="x", pady=8) self.button = yawTtk.Button(frame, text="").pack(side="right") self.update() @setInterval(2) def _update(obj): obj.update() self.__stop_update = _update(self)