Exemple #1
0
    def onQuest(self):
        global buttonVX
        def onbuttonOk():
	    output = subprocess.Popen("./menue.sh A",shell=True) 
            tkFensterFehler.destroy()    
        def onbuttonXk():
            output = subprocess.Popen("./menue.sh B",shell=True)  
            tkFensterFehler.destroy()    
        def onbuttonVX():
	    output = subprocess.Popen("./menue.sh C",shell=True)  
            tkFensterFehler.destroy()    
        def onbuttonWX():
            output = subprocess.Popen("./menue.sh D",shell=True)  
            tkFensterFehler.destroy()    
            
######### open sencond window                     

        tkFensterFehler = Toplevel()
        tkFensterFehler.title('Lichtschalter')
        tkFensterFehler.geometry('300x100+200+300')
        
        
################ button second window

        buttonOk = Button(master=tkFensterFehler, text='Lichtschalter 1 an', command=onbuttonOk)
	buttonOk.grid(row=0, column=0)

        buttonXk = Button(master=tkFensterFehler, text='Lichtschalter 1 aus', command=onbuttonXk)
	buttonXk.grid(row=1, column=0)
	
	buttonXk1 = Button(master=tkFensterFehler, text='Lichtschalter 2 an', command=onbuttonVX)
	buttonXk1.grid(row=0, column=1)
	
	buttonXk2 = Button(master=tkFensterFehler, text='Lichtschalter 2 aus', command=onbuttonWX)
	buttonXk2.grid(row=1, column=1)
Exemple #2
0
    def initUI(self):
        global init
        self.parent.title("Mavric Hip GUI")
        self.style = Style()
        self.style.theme_use("default")
        self.pack()
        
        #Initialize figure
        fig = matplotlib.figure.Figure()
        ax = fig.add_subplot(111)
        self.thisImg = np.eye(512, 512)
        self.figDrawing = ax.imshow(self.thisImg, cmap='gray')
        self.canvas=FigureCanvasTkAgg(fig,master=self)
        self.canvas.show()
        self.canvas.get_tk_widget().configure(takefocus=True)
        self.canvas.get_tk_widget().grid(row=0, column=1, columnspan=2, rowspan=1)
        
        #Reset the focus to the dicom images
        self.canvas.mpl_connect('button_press_event', lambda event:self.canvas._tkcanvas.focus_set())
        #Watch for mouse or key press events
        self.canvas.mpl_connect('button_press_event',self.selectRoi)
        self.canvas.mpl_connect('button_press_event', lambda event: PopUp())
        self.canvas.mpl_connect('key_press_event',self.writeRoi)
        #Load the buttons
        nextButton = Button(self, text="<", command=self.prev)
        nextButton.grid(row=0, column=0)
        
        openButton = Button(self, text="Open", command=self.pickFile)
        openButton.grid(row=2, column=1, sticky=E)
 
        quitButton = Button(self, text="Quit", command=self.quit)
        quitButton.grid(row=2, column=2, sticky=W)
        
        nextButton = Button(self, text=">", command=self.next)
        nextButton.grid(row=0, column=3)
    def initUI(self):
        self.parent.title("Image Copy-Move Detection")
        self.style = Style().configure("TFrame", background="#333")
        # self.style.theme_use("default")
        self.pack(fill=BOTH, expand=1)

        quitButton = Button(self, text="Open File", command=self.onFilePicker)
        quitButton.place(x=10, y=10)

        printButton = Button(self, text="Detect", command=self.onDetect)
        printButton.place(x=10, y=40)

        self.textBoxFile = Text(self, state='disabled', width=80, height = 1)
        self.textBoxFile.place(x=90, y=10)

        self.textBoxLog = Text(self, state='disabled', width=40, height=3)
        self.textBoxLog.place(x=90, y=40)

        # absolute image widget
        imageLeft = Image.open("resource/empty.png")
        imageLeftLabel = ImageTk.PhotoImage(imageLeft)
        self.labelLeft = Label(self, image=imageLeftLabel)
        self.labelLeft.image = imageLeftLabel
        self.labelLeft.place(x=5, y=100)

        imageRight = Image.open("resource/empty.png")
        imageRightLabel = ImageTk.PhotoImage(imageRight)
        self.labelRight = Label(self, image=imageRightLabel)
        self.labelRight.image = imageRightLabel
        self.labelRight.place(x=525, y=100)

        self.centerWindow()
Exemple #4
0
    def initUI(self):

        self.parent.title("Buttons")
        self.style = Style()
        self.style.theme_use("alt")

        # Styling
        self.style.configure('.', font=('Helvetica', 12), background="#300A24")
        self.style.configure(
            "PW.TLabel", foreground="#fff", background="#300A24", padding=20, justify=CENTER, wraplength="350")
        self.style.configure(
            "Medium.TButton", foreground="#300A24", background="#fff", borderwidth=0, padding=8, font=('Helvetica', 9))
        # Styling Ends

        quoteLabel = Label(self, text=self.quote, style="PW.TLabel")
        quoteLabel.pack()
        authorLabel = Label(self, text=self.author, style="PW.TLabel")
        authorLabel.pack()

        self.pack(fill=BOTH, expand=True)

        closeButton = Button(self, text="Close This",
                             style="Medium.TButton", command=self.parent.quit)
        closeButton.pack(side=RIGHT)
        okButton = Button(
            self, text="Portfolio", style="Medium.TButton", command=self.btnOneFn)
        okButton.pack(side=RIGHT)
        okButton = Button(self, text="JStack",
                          style="Medium.TButton", command=self.btnTwoFn)
        okButton.pack(side=RIGHT)
        okButton = Button(self, text="Python",
                          style="Medium.TButton", command=self.btnThreeFn)
        okButton.pack(side=RIGHT)
    def initUI(self):
        
        photo = ImageTk.PhotoImage(file='icon/main_bg_4.jpg')
        w = Tkinter.Label(self,image=photo)
        w.photo = photo 
        w.place(x=0, y=0, relwidth=1, relheight=1)
        #ackground_label.pack()
        
        
        self.api = IntVar()
        self.parent.title("Face Recognition System")
        self.style = Style()
        self.style.theme_use("default")

        self.pack(fill=BOTH, expand=1)
        
        faceplus = Radiobutton(self, text="Face++", variable=self.api, value=1)
        faceplus.place(x=50, y=40)
        
        facer = Radiobutton(self, text="FaceR Animetrics", variable=self.api, value=2)
        facer.place(x=200, y=40)

        start = Button(self, text="Start Recognition",
            command=self.startRecognition)
        start.place(x=100, y=80)
        
        helpButton = Button(self, text="Help",
            command=self.giveHelp)
        helpButton.place(x=100, y=110)
    
        quitButton = Button(self, text="Quit",
            command=self.quitGUI)
        quitButton.place(x=100, y=140)
Exemple #6
0
    def context(self):
        if self.variable.get() == "Select Arcana":
            return
        levs = []
        for x in range(1, 11):
            levs.append("Level " + str(x))
        self.level.set(levs[0])
        self.levelOM = OptionMenu(self, self.level, *levs)
        self.levelOM.grid(row=1, column=2, columnspan=2)

        self.angs = []
        try:
            tempLink = json_reader.readLink(self.variable.get())
            print tempLink
            print self.variable.get()
            for decon in tempLink["cutscenes"]:
                self.angs.append("Angle " +
                                 str(decon)[str(decon).index("_") + 1:])
        except:
            pass
        if not self.angs:
            self.angs.append("No angles")
        self.angle.set(self.angs[0])
        self.angleOM = OptionMenu(self, self.angle, *self.angs)
        self.angleOM.grid(row=2, column=2, columnspan=2)

        self.addAngB = Button(self, text="Add Angle", command=self.addAngle)
        self.addAngB.grid(row=3, column=2)

        self.newAng = Text(self, height=1, width=5)
        self.newAng.grid(row=3, column=3)

        self.go = Button(self, text="Go", command=self.begin)
        self.go.grid(row=4, column=2, columnspan=2)
 def add_buttons(fr):
     but_fr = Frame(fr)
     Button(but_fr, text='Clear List', command=lambda : clear_all()) \
         .pack(side=LEFT, padx=5, pady=2)
     Button(but_fr, text='Refresh', command=lambda : show_all()) \
         .pack(side=LEFT, padx=5, pady=2)
     but_fr.pack()
Exemple #8
0
    def initUI(self):
        self.parent.title("Simple")

        self.style = Style()
        self.style.theme_use("default")



        self.textup = Text(self, width=340, height=34)
        self.textup.bind("<KeyPress>", lambda e: "break")
        self.textup.pack()

        self.frame = Frame(self, relief=RAISED, borderwidth=1)
        self.frame.pack(fill=BOTH, expand=1)
        self.pack(fill=BOTH, expand=1)

        Label(self.frame,text = '', width= "350", height="1").pack()
        Label(self.frame,text = '欢迎大家', width= "350", height="1").pack()
        Label(self.frame,text = '', width= "350", height="3").pack()

        self.text = Text(self, width=340, height=3)
        self.text.bind("<Return>", self.sendMes)
        self.text.pack()
        closeButton = Button(self, text="Close")
        closeButton.pack(side=RIGHT, padx=5, pady=5)
        okButton = Button(self, text="OK",
                          command=self.onClick)
        okButton.pack(side=RIGHT)
    def __init__(self, name, add_handler, remove_handler, master=None):
        """
        Creates a ListFrame with the given name as its title.

        add_handler and remove_handler are functions to be called
        when items are added or removed, and should relay the information
        back to the Searcher (or whatever object actually uses the list).
        """
        LabelFrame.__init__(self, master)
        self['text'] = name
        self.add_handler = add_handler
        self.remove_handler = remove_handler
        self.list = Listbox(self)
        self.list.grid(row=0, columnspan=2)
        # Tkinter does not automatically close the right-click menu for us,
        # so we must close it when the user clicks away from the menu.
        self.list.bind("<Button-1>", lambda event: self.context_menu.unpost())
        self.list.bind("<Button-3>", self.open_menu)
        self.context_menu = Menu(self, tearoff=0)
        self.context_menu.add_command(label="Remove", command=self.remove)
        self.input = Entry(self)
        self.input.bind("<Return>", lambda event: self.add())
        self.input.grid(row=1, columnspan=2)
        self.add_button = Button(self)
        self.add_button['text'] = "Add"
        self.add_button['command'] = self.add
        self.add_button.grid(row=2, column=0, sticky=W + E)
        self.remove_button = Button(self)
        self.remove_button['text'] = "Remove"
        self.remove_button['command'] = self.remove
        self.remove_button.grid(row=2, column=1, sticky=W + E)
Exemple #10
0
    def initUI(self):
      
        self.parent.title("Food List Editor")
        self.style = Style()
        self.style.theme_use("default")
        self.pack(fill=BOTH, expand=1)

        self.columnconfigure(1, weight=1)
        self.columnconfigure(3, pad=7)
        self.rowconfigure(4, weight=1)
        self.rowconfigure(5, pad=7)
        
        lbl = Label(self, text="Food List")
        lbl.grid(sticky=W, pady=4, padx=5)
                
        abtn = Button(self, text="Add Food", command=self.sequence)
        abtn.grid(row=1, column=3)

        dbtn = Button(self, text="Delete Food", command=self.delete_food)
        dbtn.grid(row=2, column=3, pady=4)
		
        upbtn = Button(self, text="Refresh", command=self.update_list)
        upbtn.grid(row=3, column=3)

        cbtn = Button(self, text="Close", command=self.close_program)
        cbtn.grid(row=5, column=3)

        scrollbar = Scrollbar(self, orient="vertical")
        self.lb = Listbox(self, width=50, height=20,\
            yscrollcommand=scrollbar.set)
        scrollbar.config(command=self.lb.yview)

        self.make_list()
Exemple #11
0
            def __init__(self, container, frame, label='', text='', row=0, column=0):
                self.container = container
                self.is_b0 = BooleanVar(container.parent)
                self.is_dw = BooleanVar(container.parent)
                self.column = column
                self.direction = StringVar(container.parent)

                self.label_from = Label(frame, text='from')
                self.text_from = Entry(frame)
                self.text_from.insert(0, text)
                self.button_file_from = Button(frame, text='...', command=lambda:filenameDialog_text(self.text_from))
                self.button_rm = Button(frame, text='remove', command=self.click_remove)
                self.radio_ap = Radiobutton(frame, text='AP', variable=self.direction, value='AP', command=self.set_direction)
                self.radio_pa = Radiobutton(frame, text='PA', variable=self.direction, value='PA', command=self.set_direction)

                self.label_to = Label(frame, text='to')
                self.text_to = Entry(frame)
                #self.text_to.insert(0, text)
                self.button_file_to = Button(frame, text='Gen', command=self.set_filename_to)
                self.check_b0 = Checkbutton(frame, text='B0',   variable=self.is_b0)
                self.check_dw = Checkbutton(frame, text='DWI',  variable=self.is_dw)

                self.button_up = Button(frame, text='up', width=3, command=self.click_up)
                self.button_dn = Button(frame, text='down', width=3, command=self.click_dn)

                self.row = -1
                self.change_row(row)
                if text != '':
                    self.set_appa()
                    self.set_filename_to()
Exemple #12
0
    def initUI(self):
        config = ConfigParser.ConfigParser()
        config.read('settings.ini')
        default_sheet = config.get('USER', 'default_spreadsheet')
        self.pack(fill=BOTH, expand=True)
        self.columnconfigure(1, weight=1)
        self.columnconfigure(3, pad=7)

        self.rowconfigure(3, weight=1)
        self.rowconfigure(5, pad=7)

        self.lblTsv = Label(self, text="Enter TSV Export:")
        self.lblTsv.grid(sticky=W, pady=4, padx=5)

        self.txtTsv = Text(self)
        self.txtTsv.grid(row=1, column=0, columnspan=2, rowspan=4, padx=5, sticky=E+W+N+S)

        self.btnSubmit = Button(self, text="Submit", command=self.submit_text)
        self.btnSubmit.grid(row=6, column=4, padx=5)

        self.btnUpload = Button(self, text="Upload to GS", command = self.upload_db)
        self.btnUpload.grid(row=6, column=3, padx=5)

        self.btnCancel = Button(self, command=sys.exit, text="Quit")
        self.btnCancel.grid(row=6, column=2, padx=5)

        self.lblSheet = Label(self, text="Enter google sheets URL:")
        self.lblSheet.grid(row=5, sticky=W, pady=4, padx=4)

        self.sheetUrl = Entry(self)
        self.sheetUrl.grid(row=6, columnspan=2, sticky=W+E, padx=5, pady=5)
        self.sheetUrl.insert(0, default_sheet)
        return
Exemple #13
0
    def setup_widgets(self):
        """Five control widgets created along bottom"""

        # clear button
        clear_button = Button(self, text="Clear")
        clear_button.grid(row=3, column=1, padx=5, pady=5, sticky=W)
        clear_button.bind("<ButtonRelease-1>", self.clear_text)

        # Silent/Verbose select
        verbose_check = Checkbutton(self, text="Silent", \
            variable=self.verbose_flag, onvalue="-s", offvalue="")
        verbose_check.grid(row=3, column=2, padx=5, pady=5)

        # Analysis model menu
        choices2 = ['Select Model', 'model1', 'model2']
        om2 = OptionMenu(self, self.model, *choices2)  # pylint: disable=W0142
        om2.grid(row=3, column=3, padx=10, pady=20)

        # EMR Server Region menu
        choices = ['Select Region', 'Oregon', 'California', 'Virginia']
        om1 = OptionMenu(self, self.region, *choices)  # pylint: disable=W0142
        om1.grid(row=3, column=4, padx=10, pady=20)

        # Run EMR button
        emrbutton = Button(self, text="Run EMR")
        emrbutton.grid(row=3, column=5, padx=5, pady=5)
        emrbutton.bind("<ButtonRelease-1>", self.run_emr)
    def initUI(self):

        self.parent.title("HW3")

        self.pack(fill=BOTH, expand=1)

        Button(self, text="Select File", command=openFile).grid(row=0,
                                                                column=0,
                                                                pady=5)
        self.fileName = StringVar()
        Label(self, textvariable=self.fileName).grid(row=0,
                                                     column=1,
                                                     columnspan=2,
                                                     pady=5,
                                                     sticky=W)

        Label(self, text="Select Mode: ").grid(row=1, column=0, pady=5)
        mode = StringVar(self)
        mode.set("Q1-ColorHistogram")
        om = OptionMenu(self, mode, "Q1-ColorHistogram", "Q2-ColorLayout",
                        "Q3-SIFT Visual Words",
                        "Q4-Visual Words using stop words")
        om.grid(row=1, column=1, pady=5, sticky=W)

        Button(self,
               text="SEARCH",
               command=lambda: startSearching(self.fileName.get(), mode.get())
               ).grid(row=3, column=0, pady=5)

        self.images = []
        for i in range(10):
            self.images.append(Label(self))
            self.images[i].grid(row=i / 5 + 4, column=i % 5, pady=50)
Exemple #15
0
    def initUI(self):

        #some aesthetic definitions
        self.parent.title("Message Responder")
        self.style = Style()
        self.style.theme_use("classic")

        #building frame
        frame = Frame(self, relief=RAISED, borderwidth=1)
        frame.pack(fill=BOTH, expand=True)

        self.pack(fill=BOTH, expand=True)

        #adding some widgets
        label = Label(frame, text=self.text, wraplength=495, justify=LEFT)
        label.pack()
        self.textBox = Text(frame, height=2, width=495)
        self.textBox.pack(side=BOTTOM)
        #self.textBox.insert(END, '#enter ye comments here')
        labelBox = Label(frame, text="Actual Results:")
        labelBox.pack(anchor=W, side=BOTTOM)
        passButton = Button(self, text="PASS", command=self.btnClickedPass)
        passButton.pack(side=RIGHT, padx=5, pady=5)
        failButton = Button(self, text="FAIL", command=self.btnClickedFail)
        failButton.pack(side=RIGHT)
Exemple #16
0
    def init_ui(self):
        self.parent.title("Activity Logger")
        self.parent.focusmodel("active")

        self.style = Style()
        self.style.theme_use("aqua")

        self.combo_text = StringVar()
        cb = self.register(self.combo_complete)
        self.combo = Combobox(self,
                              textvariable=self.combo_text,
                              validate="all",
                              validatecommand=(cb, '%P'))

        self.combo['values'] = ["Food", "Email", "Web"]
        self.combo.pack(side=TOP, padx=5, pady=5, fill=X, expand=0)

        #self.entry = Text(self, bg="white", height="5")
        #self.entry.pack(side=TOP, padx=5, pady=5, fill=BOTH, expand=1)

        self.pack(fill=BOTH, expand=1)
        self.centre()

        self.ok = Button(self, text="Ok", command=self.do_ok)
        self.ok.pack(side=RIGHT, padx=5, pady=5)

        self.journal = Button(self, text="Journal", command=self.do_journal)
        self.journal.pack(side=RIGHT, padx=5, pady=5)

        self.exit = Button(self, text="Exit", command=self.do_exit)
        self.exit.pack(side=RIGHT, padx=5, pady=5)
Exemple #17
0
    def createWidgets(self):
        self.mainFrame = Frame(self.parent)
        Label(self.mainFrame, text='2048 Game', font=(",30"),
              fg="#2980b9").pack(padx=20, pady=20)
        f1 = Frame(self.mainFrame)
        Label(f1, text='Grid').pack(side=LEFT, padx=5)
        Combobox(f1, textvariable=self.grid).pack(side=LEFT, padx=50)
        Button(f1, text='Play', command=self.play).pack(side=LEFT, padx=5)
        f1.pack(pady=10)

        self.winFrame = Frame(self.parent)
        Label(self.winFrame, text=' you win!', font=('', 30),
              fg='#e74c3c').pack(padx=20, pady=10)
        Label(self.winFrame,
              textvariable=self.moves,
              font=('', 30),
              fg='#e74c3c').pack()
        f2 = Frame(self.winFrame)
        Button(f2, text='play again', command=self.play).pack(side=LEFT,
                                                              padx=5)
        Button(f2, text='Cancel', command=self.showMainFrame).pack(side=LEFT,
                                                                   padx=5)
        f2.pack(pady=10)

        self.gameOverFrame = Frame(self.parent)
        Label(self.gameOverFrame,
              text='Gameover!',
              font=('', 30),
              fg='#e74c3c').pack(padx=20, pady=10)
        f2 = Frame(self.gameOverFrame)
        Button(f2, text='play again', command=self.play).pack(side=LEFT,
                                                              padx=5)
        Button(f2, text='Cancel', command=self.showMainFrame).pack(side=LEFT,
                                                                   padx=5)
        f2.pack(pady=10)
Exemple #18
0
    def initUI(self):

        self.parent.title("Paste IP's Here:")
        self.style = Style()
        self.style.theme_use("aqua")
        self.pack(fill=BOTH, expand=1)

        self.columnconfigure(1, weight=1)
        self.columnconfigure(3, pad=7)
        self.rowconfigure(3, weight=1)
        self.rowconfigure(5, pad=7)

        lbl = Label(self, text="Paste IP's Here:")
        lbl.grid(sticky=W, pady=4, padx=5)

        area = Text(self)
        area.grid(row=1,
                  column=0,
                  columnspan=2,
                  rowspan=4,
                  padx=5,
                  sticky=E + W + S + N)

        abtn = Button(self, text="Open", command=self.onOpen())
        abtn.grid(row=1, column=3)

        cbtn = Button(self, text="Close")
        cbtn.grid(row=2, column=3, pady=4)

        hbtn = Button(self, text="Help")
        hbtn.grid(row=5, column=0, padx=5)

        obtn = Button(self, text="OK")
        obtn.grid(row=5, column=3)
Exemple #19
0
    def initUI(self):
        self.parent.title("Story Creator")
        self.grid(row=0, column=0)

        Style().configure("TButton", padding=(0, 5, 0, 5), background='black')

        #logo = ImageTk.PhotoImage(Image.open(json_reader.buildPath("creator_logo.png")))
        #logolabel = Label(self, image=logo, bg='black')
        #logolabel.image = logo
        #logolabel.grid(row=0, column=0)

        intframe = Frame(self)
        intframe.configure(bg='black')
        intframe.grid(row=0, column=1)

        createSL = Button(intframe,
                          text="Create Social Link",
                          command=self.actionS)
        createSL.grid(row=0, column=0)

        createPersona = Button(intframe,
                               text="Create Persona",
                               command=self.actionP)
        createPersona.grid(row=1, column=0)

        createChar = Button(intframe,
                            text="Create Character",
                            command=self.actionC)
        createChar.grid(row=2, column=0)

        quit = Button(intframe, text="Quit", command=self.quit)
        quit.grid(row=3, column=0)
Exemple #20
0
    def initUI(self):

        self.style = Style().configure("TFrame", background=self.sys.win_cfg.cBackground)
        self.pack(fill=BOTH, expand=1)
        
        titleLabel = Label(self, text=self.sys.win_cfg.sFileinfo,
                             background=self.sys.win_cfg.cBackground,
                             width=12, height=1)
        titleLabel.place(x=5, y=5)

        # file function buttons
        browseButton = Button(self, text="Browse",
            command=self.browse_folder, width=12)
        browseButton.place(x=15, y=40)
        
        netButton = Button(self, text="Net",
            command=self.net_check, width=8)
        netButton.place(x=125, y=40)
    
        chipIDLabel = Label(self, text="Chip ID: ",
                             background=self.sys.win_cfg.cBackground,
                             width=8, height=1)
        chipIDLabel.place(x=10, y=80)
        self.chipIDEntry = Entry(self, width=15,
                           background=self.sys.win_cfg.cTextBackground)
        self.chipIDEntry.place(x=85, y=80)
        
        self.chipIDEntry.insert(0, self.instant_chip_id())
        
        # close buttons
        closeButton = Button(self, text="Close",
            command=self.close_window, width=17)
        closeButton.place(x=15, y=140)
	def __init__(self, parent, controller):
		Frame.__init__(self, parent)
		self.controller = controller
		self.parent = parent

		Style().configure("TButton", padding=(0, 5, 0, 5), font='serif 10')

		self.columnconfigure(0, pad=10)
		self.columnconfigure(1, pad=10)

		self.rowconfigure(0, pad=10)
		self.rowconfigure(1, pad=10)
		self.rowconfigure(2, pad=10)

		self.btn_wifi = Button(self,
			text="Wifi Connection Demo",
			command=lambda: controller.show_frame("Test_Wifi"), width=BTN_WIDTH)
		self.btn_wifi.grid(row=1, column=0)

		self.btn_gps_3g = Button(self,
			text="3G + GPS Demo",
			command=lambda: controller.show_frame("Test_GPS3G"), width=BTN_WIDTH)
		self.btn_gps_3g.grid(row=1, column=1)

		self.btn_cepas = Button(self,
			text="Cepas Reader Demo",
			command=lambda: controller.show_frame("Test_Cepas"), width=BTN_WIDTH)
		self.btn_cepas.grid(row=2, column=0)

		self.btn_zebra_scanner = Button(self,
			text="Zebra Scanner Demo",
			command=lambda: controller.show_frame("Test_ZebraScanner"), width=BTN_WIDTH)
		self.btn_zebra_scanner.grid(row=2, column=1)

		self.pack()
Exemple #22
0
    def initUI(self):
        self.parent.title("Example")
        self.pack(fill=BOTH, expand=1)

        self.style = Style()
        self.style.theme_use("default")

        frame = Frame(self, relief=Tkinter.RAISED, borderwidth=1)
        frame.pack(fill=BOTH, expand=1)

        okButton = Button(self, text="OK")
        okButton.place(x=self.width - 200, y=self.height - 100)

        quitButton = Button(self.parent, text="QUIT")
        quitButton.place(x=self.width - 100, y=self.height - 100)

        scale = 0.75
        self.wow_pic = Image.open("hd_1.jpg")
        self.wow_pic = self.wow_pic.resize(
            (int(self.width * scale), int(self.height * scale)))
        self.wow_pic_tk = ImageTk.PhotoImage(self.wow_pic)
        self.label_wow_pic = Label(self, image=self.wow_pic_tk)
        self.label_wow_pic.image = self.wow_pic_tk
        self.label_wow_pic.place(x=10, y=10)

        info_x = int(self.width * scale) + 20

        label_text_area = Tkinter.Label(self, text="Message received:")
        label_text_area.place(x=info_x, y=10)

        self.text_area = Tkinter.Text(self, height=10, width=40)
        self.text_area.place(x=info_x, y=30)
Exemple #23
0
    def _setup_button_toolbar(self):
        '''
        The button toolbar runs as a horizontal area at the top of the GUI.
        It is a persistent GUI component
        '''

        # Main toolbar
        self.toolbar = Frame(self.root)
        self.toolbar.grid(column=0, row=0, sticky=(W, E))

        # Buttons on the toolbar
        self.run_button = Button(self.toolbar,
                                 text='Run',
                                 command=self.cmd_run)
        self.run_button.grid(column=0, row=0)

        self.step_button = Button(self.toolbar,
                                  text='Step',
                                  command=self.cmd_step)
        self.step_button.grid(column=1, row=0)

        self.next_button = Button(self.toolbar,
                                  text='Next',
                                  command=self.cmd_next)
        self.next_button.grid(column=2, row=0)

        self.return_button = Button(self.toolbar,
                                    text='Return',
                                    command=self.cmd_return)
        self.return_button.grid(column=3, row=0)

        self.toolbar.columnconfigure(0, weight=0)
        self.toolbar.rowconfigure(0, weight=0)
 def __init__(cls, master):
     cls.master = master
     cls.master.configure(background='#8A002E')
     cls.img = ImageTk.PhotoImage(Image.open("logo4.jpg"))
     cls.imglabel = Label(cls.master, image=cls.img).grid(row=0, column=3)
     cls.master.wm_title("System Configuration")
     cls.names = cls.ReadTable()
     Label(cls.master,
           background='#8A002E',
           foreground="white",
           font=("Purisa", 12),
           text="Subject|    Student Name|   Marks(%) ").grid(row=1,
                                                              column=0)
     i = 2
     for x in cls.names:
         Label(cls.master,
               background='#8A002E',
               foreground="white",
               font=("Purisa", 16),
               text=x).grid(row=int(i), column=0)
         i = i + 1
     Button(cls.master, text='Back', command=cls.Back).grid(row=7,
                                                            column=0,
                                                            sticky=W,
                                                            pady=4)
     Button(cls.master, text='HELP', command=cls.HelpCon).grid(row=7,
                                                               column=1,
                                                               sticky=W,
                                                               pady=4)
     Button(cls.master, text='Quit', command=cls.master.quit).grid(row=7,
                                                                   column=2,
                                                                   sticky=W,
                                                                   pady=4)
Exemple #25
0
    def initUI(self):

        self.parent.title("MyStock")
        self.style = Style()
        self.style.theme_use("default")

        frame = Frame(self, relief=RAISED, borderwidth=1)
        frame.pack(fill=BOTH, expand=True)

        menubar = Menu(self.parent)
        self.parent.config(menu=menubar)

        fileMenu = Menu(menubar)
        fileMenu.add_command(label="Exit", command=self.onExit)
        menubar.add_cascade(label="File", menu=fileMenu)

        submenu= Menu(fileMenu)
        submenu.add_command(label="New feed")
        submenu.add_command(label="Bookmarks")
        submenu.add_command(label="Mail")
        fileMenu.add_cascade(label='Import', menu=submenu, underline=0)

        fileMenu.add_separator()

        closeButton = Button(self, text="Close", command=self.quit)
        closeButton.pack(side=RIGHT, padx=5, pady=5)
        okButton = Button(self, text="OK")
        okButton.pack(side=RIGHT)

        self.pack(fill=BOTH, expand=1)
        self.centerWindow()
    def initUI(self):
        self.frame_top = Frame(self)
        self.frame_graph = MplCanvas(self)
        self.frame_bottom = Frame(self)

        Label(self.frame_top, text='Z = ').pack(side=LEFT)
        self.spin_z = Spinbox(self.frame_top,
                              from_=0,
                              to=self.shape[2] - 1,
                              increment=1,
                              command=self.change_z)
        self.spin_z.pack(side=LEFT)
        self.make_checkbox(self.frame_bottom, width=4)

        Label(self.frame_top, text='   CSV').pack(side=LEFT)
        self.txt_filename_csv = Entry(self.frame_top)
        self.txt_filename_csv.pack(side=LEFT)
        self.button_read = Button(self.frame_top,
                                  text='Read',
                                  command=self.run_read)
        self.button_read.pack(side=LEFT)
        self.button_save = Button(self.frame_top,
                                  text='Save',
                                  command=self.run_save)
        self.button_save.pack(side=LEFT)

        Label(self.frame_top, text='   ').pack(side=LEFT)
        button_reset = Button(self.frame_top, text='Reset',
                              command=self.reset).pack(side=LEFT)

        self.frame_top.pack(side=TOP)
        self.frame_graph.get_tk_widget().pack(fill=BOTH, expand=TRUE)
        self.frame_bottom.pack(fill=BOTH, expand=TRUE)
        self.pack(fill=BOTH, expand=True)
Exemple #27
0
    def initUI(self):

        self.style = Style().configure("TFrame",
                                       background=self.sys.win_cfg.cBackground)
        self.pack(fill=BOTH, expand=1)

        # setup labels
        self.Embedded = Label(self,
                              width=15,
                              background=self.sys.win_cfg.cUnknown,
                              text="LED: COM0")
        self.Embedded.place(x=15, y=35)
        self.Stage = Label(self,
                           width=15,
                           background=self.sys.win_cfg.cUnknown,
                           text="Stages: COM0")
        self.Stage.place(x=15, y=60)

        # setup buttons
        configComButton = Button(self,
                                 text="COM Port Setup",
                                 command=self.com_port_search,
                                 width=17)
        configComButton.place(x=15, y=5)

        # close buttons
        closeButton = Button(self,
                             text="Close",
                             command=self.close_window,
                             width=17)
        closeButton.place(x=15, y=90)
Exemple #28
0
    def initUI(self):

        self.parent.title("AUTO TIPS")
        self.style = Style()
        self.style.theme_use("default")
        self.pack(fill=BOTH, expand=1)
        self.columnconfigure(1, weight=1)
        self.columnconfigure(3, pad=7)
        self.rowconfigure(3, weight=1)
        self.rowconfigure(5, pad=7)

        lbl = Label(self, text="Status")
        lbl.grid(sticky=W, pady=4, padx=5)

        area = Text(self)
        area.grid(row=1,
                  column=0,
                  columnspan=2,
                  rowspan=4,
                  padx=5,
                  sticky=E + W + S + N)

        abtn = Button(self, text="Drive Command", command=win3)
        abtn.grid(row=1, column=3)

        cbtn = Button(self, text="Tester Manual Control", command=win2)
        cbtn.grid(row=2, column=3, pady=4)

        dbtn = Button(self, text="Auto Run", command=AutoTIPS)
        dbtn.grid(row=3, column=3, pady=4)

        obtn = Button(self, text="OK", command=self.parent.destroy)
        obtn.grid(row=5, column=3)
Exemple #29
0
    def initUI(self):
        self.parent.title("Windows")
        self.pack(fill=BOTH, expand=True)

        self.columnconfigure(1, weight=1)
        self.columnconfigure(3, pad=7)
        self.rowconfigure(3, weight=1)
        self.rowconfigure(5, pad=7)

        lbl = Label(self, text="Windows")
        lbl.grid(sticky=W, pady=4, padx=5)

        area = Text(self)
        area.grid(row=1,
                  column=0,
                  columnspan=2,
                  rowspan=4,
                  padx=5,
                  sticky=E + W + S + N)

        abtn = Button(self, text="Activate")
        abtn.grid(row=1, column=3)

        cbtn = Button(self, text="Close")
        cbtn.grid(row=2, column=3, pady=4)

        hbtn = Button(self, text="Help")
        hbtn.grid(row=5, column=0, padx=5)

        obtn = Button(self, text="OK")
        obtn.grid(row=5, column=3)
Exemple #30
0
    def initUI(self):

        self.entries_found = []

        self.parent.title("Search your command cards")
        self.style = Style()
        self.style.theme_use("default")
        self.pack()

        self.input_title = Label(self, text="Enter your command below")
        self.input_title.grid(row=0, columnspan=2)
        self.input_box = Entry(self, width=90)
        self.input_box.grid(row=1, column=0)
        self.input_box.focus()
        self.input_box.bind("<Key>", self.onUpdateSearch)
        self.search_btn = Button(self, text="Search", command=self.onSearch)
        self.search_btn.grid(row=1, column=1)
        self.output_box = Treeview(self, columns=("Example"))
        ysb = Scrollbar(self, orient='vertical', command=self.output_box.yview)
        xsb = Scrollbar(self,
                        orient='horizontal',
                        command=self.output_box.xview)
        self.output_box.configure(yscroll=ysb.set, xscroll=xsb.set)
        self.output_box.heading('Example', text='Example', anchor='w')
        self.output_box.column("#0", minwidth=0, width=0, stretch=NO)
        self.output_box.column("Example", minwidth=0, width=785)
        self.output_box.bind("<Button-1>", self.OnEntryClick)
        self.output_box.grid(row=3, columnspan=2)
        self.selected_box = Text(self, width=110, height=19)
        self.selected_box.grid(row=4, columnspan=2)
        self.gotoadd_btn = Button(self,
                                  text="Go to Add",
                                  command=self.onGoToAdd)
        self.gotoadd_btn.grid(row=5)