Exemple #1
0
    def __init__(self, master=None, cnf={}, **kw):
        yawTtk.Frame.__init__(self, master, cnf={}, **kw)
        self.columnconfigure(0, weight=1)

        self.variable = yawTtk.StringVar(self,
                                         "100%",
                                         name="%s.progress" % self._w)
        self.root = yawTtk.Label(self,
                                 textvariable=self.variable,
                                 anchor="center").grid(row=1,
                                                       column=0,
                                                       sticky="nesw")
        self.bar = yawTtk.Frame(self,
                                background="steelblue").place(x=0,
                                                              y=0,
                                                              relheight=1.0,
                                                              relwidth=1.0,
                                                              anchor="nw")
        self.label = yawTtk.Label(self.bar,
                                  padding=0,
                                  textvariable=self.variable,
                                  background="steelblue",
                                  foreground="white").place(relheight=1.0,
                                                            y=0,
                                                            anchor="n")
Exemple #2
0
    def __init__(self, master=None, cnf={}, **kw):
        yawTtk.Frame.__init__(self, master, cnf={}, **kw)
        self["relief"] = "flat"
        border = self["border"]
        border = 1 if border == "" else int(border)
        self.rowconfigure(0, weight=1)
        self.columnconfigure(0, weight=1)
        self.rowconfigure(1, minsize=border)

        self.secret = yawTtk.Tkinter.Text(self,
                                          font=("tahoma", "10"),
                                          width=0,
                                          height=2,
                                          border=2,
                                          highlightthickness=1,
                                          highlightbackground="grey",
                                          highlightcolor="steelblue",
                                          relief="flat",
                                          wrap="word")
        self.secret.grid(row=0, column=0, sticky="nesw", padx=4)
        self.border = yawTtk.Frame(self).grid(row=1,
                                              column=0,
                                              sticky="nesw",
                                              padx=4)
        self.border["background"] = "steelblue"
Exemple #3
0
    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)
Exemple #4
0
	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)
Exemple #5
0
    def __init__(self, master=None, cnf={}, **kw):
        yawTtk.Frame.__init__(self, master, cnf={}, **kw)
        self.columnconfigure(0, weight=1)
        self.rowconfigure(1, weight=1)

        yawTtk.Label(self, font=("tahoma", "8", "bold"),
                     text="Payroll").grid(row=0,
                                          column=0,
                                          sticky="nesw",
                                          padx=4,
                                          pady=4)
        frame = yawTtk.Frame(self, border=0, padding=4,
                             height=0).grid(row=1,
                                            column=0,
                                            columnspan=2,
                                            sticky="nesw")
        frame.columnconfigure(0, weight=1)
        frame.rowconfigure(0, weight=1)
        self.data = DataView(frame, padding=0, height=0,
                             show="headings").grid(row=0,
                                                   column=0,
                                                   sticky="nesw")
        self.data.headers = [
            "address", "payout", "weight (%)", "send", "saved"
        ]
        self.data.configureHeader()
        yawTtk.Autoscrollbar(frame, target=self.data,
                             orient="horizontal").grid(row=1,
                                                       column=0,
                                                       sticky="nesw")
        yawTtk.Autoscrollbar(frame, target=self.data,
                             orient="vertical").grid(row=0,
                                                     column=1,
                                                     rowspan=2,
                                                     sticky="nesw")
        self.progress = ProgressFrame(self, relief="solid", padding=2)