Beispiel #1
0
    def build(self):
        # control variables
        self.copy_file = Tk.StringVar()

        # frame 0
        self.fr0 = Tix.Frame(self.toplevel)
        self.bu9 = Tix.Button(
            self.fr0,
            text="Cancel",
            command=self.cancel,
        )
        self.bu9.pack(padx=5, pady=5)

        # frame 4
        self.lf4 = Tk.LabelFrame(
            self.toplevel,
            text="Copy progress",
        )
        self.la4 = Tk.Label(self.lf4,
                            width=40,
                            anchor="w",
                            textvariable=self.copy_file)
        self.me4 = Tix.Meter(self.lf4, value=0.0)
        self.la4.pack(padx=5, pady=5)
        self.me4.pack(padx=5, pady=5)

        # pack frames
        self.lf4.pack(padx=5, pady=5)
        self.fr0.pack(side="bottom")
Beispiel #2
0
    def create_main_widgets(self):

        combo_box = Tix.ComboBox(self)
        combo_box.grid(column=0, row=0, sticky='news', padx=4, pady=4)

        button_box = Tix.ButtonBox(self)
        button_box.add('button_1', text='Button_1')
        button_box.add('button_2', text='Button_2')
        button_box.grid(column=0, row=1, sticky='news', padx=4, pady=4)

        control = Tix.Control(self)
        control.grid(column=0, row=2, sticky='news', padx=4, pady=4)

        label_entry = Tix.LabelEntry(self, label="Label for entry")
        label_entry.grid(column=0, row=3, sticky='news', padx=4, pady=4)

        meter = Tix.Meter(self)
        meter.grid(column=0, row=4, sticky='news', padx=4, pady=4)

        options = Tix.OptionMenu(self)
        options.grid(column=0, row=5, sticky='news', padx=4, pady=4)

        file_entry = Tix.FileEntry(self)
        file_entry.grid(column=0, row=6, sticky='news', padx=4, pady=4)