Esempio n. 1
0
    def _init_components(self):
        self._panes = PanedWindow(self, orient='horizontal', sashrelief="raised")
        self._panes.pack(expand=True, fill='both')

        self._left_pane = Frame(self._panes, padx=10, pady=5)
        self._right_pane = PanedWindow(self._panes)
        self._panes.add(self._left_pane, sticky='n')
        self._panes.add(self._right_pane)

        self._group_select = GroupSelect(self._left_pane)
        self._group_select.pack(expand=True, fill='x')

        # spacer
        Frame(self._left_pane, height=10).pack()

        graph_controls = LabelFrame(self._left_pane, text="Graph options", padx=10, pady=5)
        graph_controls.columnconfigure(1, weight=1)
        graph_controls.pack(expand=True, fill='x')

        self._show_graph_checkbutton = CheckBox(graph_controls, text='Show graph')
        self._show_graph_checkbutton.select()
        self._show_graph_checkbutton.grid(row=0, columnspan=2, sticky='w')

        Label(graph_controls, text='Algorithm').grid(row=1, sticky='w')
        self._graph_type = OptionList(graph_controls, values=MainWindow.GRAPH_TYPES.keys())
        self._graph_type.config(width=15)
        self._graph_type.grid(row=1, column=1, sticky='we')

        # spacer
        Frame(self._left_pane, height=10).pack()

        self._go_button = Button(self._left_pane, text='Go', command=self._go)
        self._go_button.pack()
    def __init__(self, master, tracker, text="Joystick", **options):
        LabelFrame.__init__(self, master, text=text, **options)
        self.tracker = tracker

        self.width = 400
        self.height = 400
        self.canvas = Canvas(self, height=self.height, width=self.width)
        self.canvas.grid()
        self.canvas.create_oval((self.width/2 - 3, self.height/2 - 3,
                                 self.width/2 + 3, self.height/2 + 3))
        self.canvas.bind("<Button-1>",
                         bg_caller(lambda event: self.move_tracker(event)))
        self.canvas.bind("<Motion>", self.update_label)

        self.motion_label = Label(self, text="",
                                  font=tkFont.Font(family="Courier"))
        self.motion_label.grid()

        f = LabelFrame(self, text="Sensitivity")
        self.sensitivity_scale = Scale(f, from_=0, to=10,
                                       resolution=0.01,
                                       orient=HORIZONTAL,
                                       length=self.width)
        self.sensitivity_scale.set(5)
        self.sensitivity_scale.grid()
        f.grid()
Esempio n. 3
0
 def initUI(self):
     "Text to enter the clear text"
     self.clearLabelFrame = LabelFrame(self.parent, text = "Search Text")
     self.clearLabelFrame.place(x = 65, y = 20)
     self.clearText = Text(self.clearLabelFrame, width = 65, height = 5)
     self.clearText.pack()
     
     "Button to encode"
     self.encodeButton = Button(self.parent, text = "Search", command = self.search)
     self.encodeButton.place(x = 460, y = 130)
     
     "Text to display encoded text"
     self.encodedLabelFrame = LabelFrame(self.parent, text = "Tweets")
     self.encodedLabelFrame.place(x = 65, y = 160)
     self.encodedText = Text(self.encodedLabelFrame, width = 65, height = 15)
     self.encodedText.pack()
     
     "Send tweet"
     self.clearLabelFrame = LabelFrame(self.parent, text = "Tweet")
     self.clearLabelFrame.place(x = 65, y = 400)
     self.sendTweet = Text(self.clearLabelFrame, width = 65, height = 5)
     self.sendTweet.pack()
     
     "Button to encode"
     self.encodeButton = Button(self.parent, text = "Send", command = self.send)
     self.encodeButton.place(x = 470, y = 500)
Esempio n. 4
0
	def __init__(self, root, prtr, settings, log, *arg):
		LabelFrame.__init__(self, root, *arg, text="Send gcode")
		self.app = root
		self.printer = prtr
		self.settings = settings
		self.log = log

		self.entry = Entry(self, width=50)
		self.entry.grid(row=1, column=1, columnspan=3, sticky=N+E+W)
		
		self.bSend = Button(self, text="Send", width=4, command=self.doSend, state=DISABLED)
		self.bSend.grid(row=1, column=4, padx=2)
		
		self.entry.delete(0, END)
		
		self.entry.bind('<Return>', self.hitEnter)
		self.gcv = StringVar(self)
		
		gclist = gcoderef.gcKeys()
		self.gcv.set(gclist[0])

		l = Label(self, text="G Code Reference:", justify=LEFT)
		l.grid(row=2, column=1, columnspan=2, sticky=W)

		self.gcm = Combobox(self, textvariable=self.gcv)
		self.gcm['values'] = gclist
		self.gcm.grid(row=2, column=3, padx=2)
		
		self.gcm.bind('<<ComboboxSelected>>', self.gcodeSel)
Esempio n. 5
0
    def __init__(self, master, text="Position", **options):
        LabelFrame.__init__(self, master, text=text, **options)
        self.tracker = master.tracker

        self.listbox = Listbox(self)
        self.listbox.widget.configure(selectmode=SINGLE)
        self.listbox.grid(row=0, column=0, rowspan=6)

        self.name_frame = LabelFrame(self, text="Name")
        self.name_field = Entry(self.name_frame)
        self.name_field.grid()
        self.name_frame.grid(row=0, column=1)

        self.save_button = Button(self, text="Save current",
                                  command=bg_caller(self.save_position))
        self.save_button.grid(row=1, column=1)
        self.go_to_button = Button(self, text="Go to",
                                   command=bg_caller(self.go_to_position))
        self.go_to_button.grid(row=2, column=1)
        self.delete_button = Button(self, text="Delete",
                                    command=self.delete_position)
        self.delete_button.grid(row=3, column=1)
        self.write_button = Button(self, text="Write to file",
                                   command=self.write_to_file)
        self.write_button.grid(row=4, column=1)
        self.load_button = Button(self, text="Load from file",
                                   command=self.load_from_file)
        self.load_button.grid(row=5, column=1)
Esempio n. 6
0
    def __init__(self, x):
        LabelFrame.__init__(self, x)
#        self.default_font = tkFont.nametofont("TkDefaultFont")
#        self.default_font.configure(family="Helvetica",size=10)

        self.config(relief=GROOVE)
        self.config(borderwidth=2)
        self.config(text = "Up Time")
        self.config(labelanchor = "n")
        
        self.Hsv = StringVar()
        self.Hsv.set("")
        self.Hlabel = Label(self, textvariable = self.Hsv)
        self.Hlabel.grid(row=0, column=0, sticky="wens")
        self.Hlabel.config(font=("Courier", 14))
        
        self.Msv = StringVar()
        self.Msv.set("")
        self.Mlabel = Label(self, textvariable = self.Msv)
        self.Mlabel.grid(row=1, column=0, sticky="wens")
        self.Mlabel.config(font=("Courier", 14))
        
        self.Ssv = StringVar()
        self.Ssv.set("")
        self.Slabel = Label(self, textvariable = self.Ssv)
        self.Slabel.grid(row=2, column=0, sticky="wens")
        self.Slabel.config(font=("Courier", 14))

        self.pack()
Esempio n. 7
0
	def __init__(self, root, prtr, settings, log, *arg):
		LabelFrame.__init__(self, root, *arg, text="Extruder")
		self.app = root
		self.printer = prtr
		self.settings = settings
		self.log = log

		self.bExtrude = Button(self, text="Extrude", width=10, command=self.doExtrude)
		self.bExtrude.grid(row=1, column=1, padx=2)
		
		self.spDistance = Spinbox(self, from_=1, to=MAXDIST, width=6, justify=RIGHT)
		self.spDistance.grid(row=1, column=2)
		self.spDistance.delete(0, END)
		self.spDistance.insert(0, STARTDIST)
		self.spDistance.bind("<FocusOut>", self.valDistance)
		self.spDistance.bind("<Leave>", self.valDistance)

		l = Label(self, text="mm", justify=LEFT)
		l.grid(row=1, column=3, sticky=W)

		self.bReverse = Button(self, text="Reverse", width=10, command=self.doReverse)
		self.bReverse.grid(row=2, column=1, padx=2)
		
		self.spSpeed = Spinbox(self, from_=1, to=MAXFEED, width=6, justify=RIGHT)
		self.spSpeed.grid(row=2, column=2)
		self.spSpeed.delete(0, END)
		self.spSpeed.insert(0, self.settings.efeed)
		self.spSpeed.bind("<FocusOut>", self.valSpeed)
		self.spSpeed.bind("<Leave>", self.valSpeed)

		l = Label(self, text="mm/min", justify=LEFT)
		l.grid(row=2, column=3, sticky=W)
    def __init__(self, tracker, board, *args, **kwargs):
        Frame.__init__(self, *args, **kwargs)
        self.tracker = tracker
        self.board = board

        tracker_subframe = LabelFrame(self, text="Tracker stuff")
        self.tracker_button = Button(tracker_subframe, text="Tracker",
                                     command=self.open_tracker_frame)
        self.tracker_button.grid()
        self.joystick_button = Button(tracker_subframe, text="Joystick",
                                      command=self.open_joystick_frame)
        self.joystick_button.grid()
        self.reposn_button = Button(tracker_subframe, text="Repositioning",
                                    command=self.open_repositioning_frame)
        self.reposn_button.grid()
        self.measure_button = Button(tracker_subframe, text="Measure",
                                     command=self.open_measure_frame)
        self.measure_button.grid()
        self.plotting_button = Button(tracker_subframe, text="Plotting",
                                      command=self.open_plotting_frame)
        self.plotting_button.grid()
        tracker_subframe.grid()

        self.actuator_button = Button(self, text="Actuators",
                                      command=self.open_actuator_frame)
        self.actuator_button.grid()
Esempio n. 9
0
    def __initUi(self):
        self.master.title('Shine Production')
        self.pack(fill=BOTH, expand=1)

        Style().configure("TFrame", background="#333")

        #Status of Test frame
        self.status_frame = LabelFrame(self, text='Status', relief=RIDGE, width=800, height=500)
        self.status_frame.place(x=20, y=20)
        
        #QR SERIAL # Frame
        self.path_frame = LabelFrame(self, text='QR Serial Code', relief=RIDGE, height=60, width=235)
        self.path_frame.place(x=400, y=550)
        entry = Entry(self.path_frame, bd=5, textvariable=self.serial_num_internal)
        entry.place(x=50, y=5)

        #TEST RESULTS LABEL
        w = Label(self.status_frame, textvariable=self.results)
        w.place(x=50, y=50)

        #START Button
        self.start_button = Button(self, text="Start", command=self.start, height=4, width=20)
        self.start_button.place(x=100, y=550)

        # Initialize the DUT
        initDUT()
Esempio n. 10
0
	def convertChoice(self):

		#Las partes que integran el primer submenu llamado "DE", labelFrame,menu, entrada.
		self.labelFrameFrom=LabelFrame(self.master,text="De",background=R.Bgcolor)
		self.labelFrameFrom.grid(row=1,column=0,padx=5,pady=3)

		self.menuFrom=OptionMenu(self.labelFrameFrom,self.fromLabel,"",)
		self.menuFrom.configure(bg=R.White,fg=R.Black,activebackground=R.hoverBtnColor,highlightbackground=R.Bgcolor,
								indicatoron=0,image=self.btnFlechaimg, compound='right')
		self.menuFrom.grid(row=0,column=0,padx=3,pady=2,sticky=E)

		self.entryFrom=Entry(self.labelFrameFrom,justify='center',textvariable=self.fromNumber)
		self.entryFrom.grid(row=2,column=0,padx=5,pady=5)

		#Las partes que integran el segundo submenu llamado "Hasta", labelFrame, menu, entrada.

		self.labelFrameTo=LabelFrame(self.master,text="Hacia",background=R.Bgcolor)
		self.labelFrameTo.grid(row=1,column=1,padx=5,pady=3)

		self.menuTo=OptionMenu(self.labelFrameTo,self.toLabel,"",)
		self.menuTo.configure(bg=R.White,fg=R.Black, activebackground=R.hoverBtnColor,highlightbackground=R.Bgcolor,
					indicatoron=0,image=self.btnFlechaimg, compound='right')
		self.menuTo.grid(row=0,column=0, padx=3, pady=2, sticky=E)

		self.entryTo=Entry(self.labelFrameTo,justify='center',textvariable=self.toNumber,state="readonly")
		self.entryTo.configure(bg="red", readonlybackground=R.Bgcolor)
		self.entryTo.grid(row=2,column=0,padx=3,pady=5)
Esempio n. 11
0
    def __initUi(self):
        self.master.title('Shine Production')
        self.pack(fill=BOTH, expand=1)

        Style().configure("TFrame", background="#333")

        #Status frame
        self.status_frame = LabelFrame(self,
                                       text='Status',
                                       relief=RIDGE,
                                       width=800,
                                       height=500)
        self.status_frame.place(x=20, y=20)

        #QRFrame
        self.path_frame = LabelFrame(self,
                                     text='QR Serial Code',
                                     relief=RIDGE,
                                     height=60,
                                     width=225)
        self.path_frame.place(x=400, y=550)
        entry = Entry(self.path_frame, bd=5, textvariable=self.serial_num)
        entry.place(x=50, y=5)

        #START
        self.start_button = Button(self,
                                   text="Start",
                                   command=self.start,
                                   height=4,
                                   width=20)
        self.start_button.place(x=100, y=550)
Esempio n. 12
0
class ihm(Tkinter.Tk):
    def entrer():
        print 'click'
        self.value.set("bonjour")
        self.entrer.pack()

    def __init__(self, parent):
        Tkinter.Tk.__init__(self, parent)
        self.parent = parent

        self.initialize()

    def initialize(self):
        #layout manager
        self.grid()

        #champ de texte (entrer)
        self.lframe = LabelFrame(self, text="Nom du noeud", padx=50, pady=20)
        self.lframe.pack(fill="both", expand="yes")
        self.lframe.grid(column=0, row=0, sticky='EW')

        self.value = StringVar()
        #self.value.set("Noeud")
        self.entrer = Tkinter.Entry(self.lframe,
                                    fg='grey',
                                    textvariable=self.value).pack()

        self.button = Tkinter.Button(self, text="Ok", command=self.entrer)
        self.button.grid(column=1, row=0)

        #self.label = Tkinter.Label(self,anchor="center",text = 'Nom du noeud :',fg="black",bg="white")
        #self.label.grid(column=0,row=0,columnspan=2,sticky='EW')
        #redimensionnement auto
        self.grid_columnconfigure(0, weight=1)
        self.geometry("800x600+300+0")
Esempio n. 13
0
    def __init__(self, x):
        LabelFrame.__init__(self, x)       
#        self.default_font = tkFont.nametofont("TkDefaultFont")
#        self.default_font.configure(family="Helvetica",size=12)
        self.config(relief=GROOVE)
        self.config(borderwidth=2, padx=5, pady=5)
        self.config(text = "Encoder")
        self.config(labelanchor = "n")

        self.INSTRUCTION = StringVar()
        self.INSTRUCTION.set("Instruction")
        
        self.machinecode = StringVar()
        self.machinecode.set("")

        self.codeEntry = Entry(self, textvariable=self.INSTRUCTION)

        #self.codeEntry.configure(font=("Helvetica", 12), width=40)
        self.codeEntry.configure(width=40)

        self.codeButton = Button(self, text="Compile")

        self.VHPL = Label(self, text="VHPL")

        self.codeButton.grid(row=0, column=0, rowspan=4, sticky="wens")

        self.VHPL.grid(row=0, column=1, sticky="wens")
        self.VHPL.config(relief=GROOVE, borderwidth=2)
        
        self.codeEntry.grid(row=1, column=1, sticky="wens")
        self.codeEntry.config(fg="green", bg="black")
        
        self.pack()
Esempio n. 14
0
class MeasureFrame(LabelFrame):
    def __init__(self, master, tracker, text="Measuring", *args, **kwargs):
        LabelFrame.__init__(self, master, text=text, *args, **kwargs)
        self.tracker = tracker

        self.config_frame = NamedEntryFrame(self, (OBS_INTERVAL,
                                                   NUM_SAMPLES,
                                                   NUM_OBSS),
                                            parsers={OBS_INTERVAL: float,
                                                     NUM_SAMPLES: int,
                                                     NUM_OBSS: int})
        self.config_frame.grid()

        self.save_frame = LabelFrame(self, text="Saving")
        self.dest_selector = FileSelectionFrame(self.save_frame,
                                                ask_mode="save")
        self.dest_selector.grid(row=0, column=0, columnspan=2)
        self.save_button = Button(self.save_frame, text="Save",
                                  command=bg_caller(self.save))
        self.save_button.grid(row=1, column=0)
        self.appending_var = BooleanVar()
        self.append_checkbutton = Checkbutton(self.save_frame, text="Append",
                                              variable=self.appending_var)
        self.append_checkbutton.grid(row=1, column=1)
        self.save_frame.grid()

    def measure(self, only_accurate=True):
        try:
            interval = self.config_frame.get(OBS_INTERVAL)
            samples = self.config_frame.get(NUM_SAMPLES)
            num_obss = self.config_frame.get(NUM_OBSS)
        except ValueError:
            logger.error("Could not parse input fields.")
        data = self.tracker.measure(observation_interval=interval,
                                    samples_per_observation=samples,
                                    number_of_observations=num_obss)
        if only_accurate:
            accurate_data = [point for point in data
                             if point.status == point.DATA_ACCURATE]
            num_invalid = len(data) - len(accurate_data)
            if num_invalid > 0:
                logger.warning("Hiding {} inaccurate data points."
                               .format(num_invalid))
            return accurate_data
        else:
            return data

    def save(self, only_accurate=True):
        dest = self.dest_selector.path_var.get()
        if not dest:
            logger.error("Must select a destination file.")
            return

        data = self.measure(only_accurate=only_accurate)
        w = csv.writer(open(dest, 'a' if self.appending_var.get() else 'w'))
        for point in data:
            w.writerow((point.time, point.position.r,
                        point.position.theta, point.position.phi))

        logger.info("Saved measurements into {!r}".format(dest))
Esempio n. 15
0
    def init_gui(self):
        '''
        Initialize a simple gui.
        '''
        top = Frame(self.master)
        top.grid(**self.paddingArgs)

        #======================================================================
        # Top frame
        #======================================================================

        info_frame = Frame(top)
        info_frame.grid(column=0, row=0)

        text = Label(info_frame, text='OCCI service URL:')
        text.grid(column=0, row=0, **self.paddingArgs)

        # self.url.set('http://fjjutraa.joyent.us:8888')
        self.url.set('http://localhost:8888')
        entry = Entry(info_frame, width=25, textvariable=self.url)
        entry.grid(column=1, row=0, **self.paddingArgs)

        go = Button(info_frame, text='Go', command=self.run_tests)
        go.grid(column=2, row=0, **self.paddingArgs)

        reset = Button(info_frame, text='Reset', command=self.reset)
        reset.grid(column=3, row=0, **self.paddingArgs)

        #======================================================================
        # Test frame
        #======================================================================

        self.test_frame = LabelFrame(top, borderwidth=2, relief='groove',
                                     text='Tests')
        self.test_frame.grid(row=1, **self.paddingArgs)

        i = 0
        for item in self._get_tests().keys():
            label = Label(self.test_frame, text=item)
            label.grid(row=i, sticky=W, **self.paddingArgs)

            label2 = Label(self.test_frame, text='...')
            label2.grid(column=1, row=i, sticky=N + E + W + S,
                        **self.paddingArgs)

            i += 1

        #======================================================================
        # Bottom
        #======================================================================

        note = 'NOTE: Passing all tests only indicates that the service\n'
        note += 'you are testing is OCCI compliant - IT DOES NOT GUARANTEE IT!'

        label = Label(top, text=note)
        label.grid(row=2, **self.paddingArgs)

        quit_button = Button(top, text='Quit', command=self.quit)
        quit_button.grid(row=3, sticky=E, **self.paddingArgs)
Esempio n. 16
0
    def __init__(self, x):
        LabelFrame.__init__(self, x)
#        self.default_font = tkFont.nametofont("TkDefaultFont")
#        self.default_font.configure(family="Helvetica",size=10)        
        self.config(relief=GROOVE)
        self.config(borderwidth=2)
        self.config(text="Decoder")
        self.mkButtons()
	def site(self):
		from Tkinter import LabelFrame
		site_frame = LabelFrame(self.root, height = 100, width = 150, text = "Site settings")
		site_frame.grid(column = 0, row = 0, columnspan = 1, rowspan = 1)

		from scrolledlist import ScrolledList
		site = ScrolledList(site_frame, width = 20, height = 3)
		site.grid(column = 0, row = 0, columnspan = 1, rowspan = 1)
Esempio n. 18
0
 def __init__(self, **kwargs):
     master = None if 'master' not in kwargs else kwargs['master']
     LabelFrame.__init__(self, master, text='Wheel')
     self.unitopts = ['%s (%s)' % (x.name, x.symbol)
                      for x in WheelEntry.DIA_UNITS]
     self.__val = WheelEntry.DIA_UNITS[0]
     self.createSpin()
     self.create_unit_opts()
Esempio n. 19
0
 def __init__(self, **kwargs):
     master = None if 'master' not in kwargs else kwargs['master']
     LabelFrame.__init__(self, master, text='Output Options')
     self.config(padx=20, pady=5)
     self.cadences = CadenceEntry()
     self.cadences.grid(row=0, column=0, sticky=W, in_=self)
     self.velocity = VelocitySelect()
     self.velocity.grid(row=1, column=0, sticky=W, in_=self)
Esempio n. 20
0
    def __init_motor(self):
        self.w_lf_motor = LabelFrame(self.window, text=u'Моторы')
        self.w_scale_motor1 = Scale(self.w_lf_motor, from_=-255, to=255)
        self.w_scale_motor2 = Scale(self.w_lf_motor, from_=-255, to=255)

        self.w_lf_motor.place(relx=0, rely=0, relwidth=1, relheight=0.3)
        self.w_scale_motor1.place(relx=0, rely=0, relwidth=1, relheight=1)
        self.w_scale_motor2.place(relx=0.5, rely=0, relwidth=1, relheight=1)
Esempio n. 21
0
 def __init__(self, **kwargs):
     master = None if 'master' not in kwargs else kwargs['master']
     LabelFrame.__init__(self, master, text='Output Options')
     self.config(padx=20, pady=5)
     self.cadences = CadenceEntry()
     self.cadences.grid(row=0, column=0, sticky=W, in_=self)
     self.velocity = VelocitySelect()
     self.velocity.grid(row=1, column=0, sticky=W, in_=self)
Esempio n. 22
0
	def __init__(self, root, *arg):
		LabelFrame.__init__(self, root, *arg, text="Log")
		self.log = Text(self, width=60, height=24, state=DISABLED, wrap=WORD, takefocus="0")
		self.log.grid(row=1, column=1, sticky=N+E+W+S)
		
		self.sblog = Scrollbar(self, command=self.log.yview, orient="vertical")
		self.sblog.grid(column=2, row=1, sticky=N+S+E)
		self.log.config(yscrollcommand=self.sblog.set)
Esempio n. 23
0
class Message(Show_style):
    def __init__(self, master=None):
        Show_style.__init__(self, master)
        self.add_status()
        self.create_widget()
        self.pack_all()

    def create_widget(self):
        self.create_main_frame()

    def create_main_frame(self):
        self.main_labelframe = LabelFrame(self, text='消息中心')
        self.main_list_item = (('业务编号',10),('客户编号',8),('客户名称',20),('发放日',10),('到期日',10),('贷款金额',5),('产品名称',10),('期限', 5),('利率',8), ('申请状态', 14))
        self.main_list = MultiListbox(self.main_labelframe, self.main_list_item, height=22)
        self.main_list.grid(padx=10, pady=10, row=0, column=0)

        self.check_button = Button(self.main_labelframe, text='察看')
        def check_func():
            apply_information = self.get_mutilistbox_choose()
            if not apply_information:
                MessageBox('当前申请', '请先选中一个申请消息')
                return
            self.apply_information_toplevel = ApplyInformationToplevel(self, apply_information)
        self.check_button['command'] = check_func
        self.check_button.grid(pady=10, row=1, column=0)
    
    def get_mutilistbox_choose(self):
        now = self.main_list.curselection()
        if not now:
            return None
        else:
            print 'now', self.main_list.get(now)
            number = self.main_list.get(now)[0]
            #return const.apply_information_list[int(now[0])]
            for apply_information in const.apply_information_list:
                if apply_information[15] == number:
                    return apply_information

    def refresh_mutilistbox(self):
        self.main_list.delete(0, self.main_list.size())
        self.add_item()

    def add_item(self):
        apply_list = show_apply_list()
        for p in apply_list:
            now_state = int(p[-1])
            if now_state >= 5:
                p[-1] = '审核通过'
            elif now_state > int(const.user_type):
                p[-1] = '等待上级审核'
            elif now_state == int(const.user_type):
                p[-1] = '等待当前用户审核'
            elif now_state < int(const.user_type):
                continue
            self.main_list.insert(Tkinter.END, p)

    def pack_all(self):
        self.main_labelframe.pack()
Esempio n. 24
0
 def __init__(self, win, title):
     LabelFrame.__init__(self, win)
     self["text"] = title
     self.content_view = Label(
         self,
         justify=Tkinter.LEFT,
         anchor="nw",
     )
     self.content_view.pack(side="top", padx=15, pady=15)
Esempio n. 25
0
 def __init__(self, **kwargs):
     master = None if 'master' not in kwargs else kwargs['master']
     LabelFrame.__init__(self, master, text='Wheel')
     self.unitopts = [
         '%s (%s)' % (x.name, x.symbol) for x in WheelEntry.DIA_UNITS
     ]
     self.__val = WheelEntry.DIA_UNITS[0]
     self.createSpin()
     self.create_unit_opts()
Esempio n. 26
0
    def populateControlFrame(self, master):

        master.grid_columnconfigure(0, weight=1)

        row = 0
        col = 0
        w = LabelFrame(master, text='Control')
        w.grid(row=row, column=col, sticky=NSEW, padx=5, pady=5)
        self.populateControlFrameWidgets(w)
Esempio n. 27
0
 def __init__(self, win, title, content):
     LabelFrame.__init__(self, win)
     self["text"] = title
     self.content_view = Label(self,
                               justify=Tkinter.LEFT,
                               anchor="w",
                               text=content)
     self.content_view.pack(side="top", fill=Tkinter.X, padx=15, pady=2)
     self.pack(side="top", fill=Tkinter.X, padx=10, pady=12)
Esempio n. 28
0
 def __init__(self, parent, **kwargs):
     """!
     The constructor for the class
     @param self The pointer for the object
     @param parent The parent object for the frame
     @param **kwargs Other arguments as accepted by Tkinter.Frame
     """
     LabelFrame.__init__(self, parent, **kwargs)
     self.configure(background=DEFAULT_BACKGROUND)
Esempio n. 29
0
    def __init_light(self):
        self.w_lf_light = LabelFrame(self.window, text=u'Свет')
        self.w_l_light = Label(self.w_lf_light,
                               text=u'Выключен',
                               fg='red',
                               font='Arial 20')

        self.w_lf_light.place(relx=0, rely=0.3, relwidth=1, relheight=0.15)
        self.w_l_light.place(relx=0, rely=0, relwidth=1, relheight=1)
Esempio n. 30
0
def callHelpdWindow():
    textvar='K-TAIL State Transition Software\nVersion:1.0\nAuthor:Lenz L Nerit\University:Victoria University of Wellington\n'
    helpWind=Toplevel()
    helpWind.resizable(width=FALSE, height=FALSE)
    frame=ttk.Frame(helpWind)
    frm=LabelFrame(frame,text='test')
    frm.pack()
    lbl=Label(frm,text="sampleStatus",width=10,bg='blue')
    lbl.pack(fill=BOTH)
    helpWind.mainloop()
	def time(self):
		from Tkinter import LabelFrame
		time_frame = LabelFrame(self.root, height = 100, width = 150, text = "Time settings")
		time_frame.grid(column = 1, row = 0, columnspan = 1, rowspan = 1)

		from Tkinter import Radiobutton
		time_now = Radiobutton(time_frame, text = "Now", variable = time, value = 1)
		time_now.grid(column = 0, row = 0, columnspan = 1, rowspan = 1)
		time_selection = Radiobutton(time_frame, text = "Select", variable = time, value = 2)
		time_selection.grid(column = 0, row = 1, columnspan = 1, rowspan = 1)
Esempio n. 32
0
    def __init__(self, master, text="Modes", **options):
        LabelFrame.__init__(self, master, text=text, **options)
        self.tracker = master.tracker

        self.mode_menu = OptionMenu(self, (tracker.IFM_SET_BY_ADM,
                                           tracker.IFM, tracker.ADM))
        self.mode_menu.grid(row=0, column=0)
        self.set_mode_button = Button(self, text="Set mode",
                                      command=bg_caller(self.set_mode))
        self.set_mode_button.grid(row=0, column=1)
    def __init__(self, master, names, parsers={}, **kwargs):
        LabelFrame.__init__(self, master, **kwargs)

        entries = {}
        for name in names:
            f = LabelFrame(self, text=name)
            entries[name] = Entry(f)
            entries[name].grid()
            f.grid()

        NamedEntryContainer.__init__(self, entries=entries, parsers=parsers)
Esempio n. 34
0
 def __init__(self, **kwargs):
     master = None if 'master' not in kwargs else kwargs['master']
     title = None if 'title' not in kwargs else kwargs['title']
     rings = [] if 'rings' not in kwargs else kwargs['rings']
     LabelFrame.__init__(self, master, text=title)
     self.config(padx=20, pady=5)
     self.rings = []
     self.addbut = Button(text='+', command=self.userAddRing)
     for ring in rings:
         self.addRing(ring)
     self.renderRings()
Esempio n. 35
0
 def __init__(self, **kwargs):
     master = None if 'master' not in kwargs else kwargs['master']
     title = None if 'title' not in kwargs else kwargs['title']
     rings = [] if 'rings' not in kwargs else kwargs['rings']
     LabelFrame.__init__(self, master, text=title)
     self.config(padx=20, pady=5)
     self.rings = []
     self.addbut = Button(text='+', command=self.userAddRing)
     for ring in rings:
         self.addRing(ring)
     self.renderRings()
    def site(self):
        from Tkinter import LabelFrame
        site_frame = LabelFrame(self.root,
                                height=100,
                                width=150,
                                text="Site settings")
        site_frame.grid(column=0, row=0, columnspan=1, rowspan=1)

        from scrolledlist import ScrolledList
        site = ScrolledList(site_frame, width=20, height=3)
        site.grid(column=0, row=0, columnspan=1, rowspan=1)
Esempio n. 37
0
 def __init__(self):
     self.root = Tk()
     self.input_type = Tkinter.IntVar()
     self.input_type.set(1)
     self.normalize_data = Tkinter.IntVar()
     self.normalize_data.set(1)
     self.root.title("Code energy calculator")
     self.left_frame = LabelFrame(self.root, text="Input and output")
     self.left_frame.pack(side=Tkinter.LEFT,
                          fill=Tkinter.BOTH,
                          expand=True,
                          padx=(10, 5),
                          pady=10)
     self.right_frame = LabelFrame(self.root, text="Code")
     self.right_frame.pack(side=Tkinter.RIGHT,
                           fill=Tkinter.BOTH,
                           expand=True,
                           padx=(5, 10),
                           pady=10)
     code_hscroll = Scrollbar(self.right_frame, orient=Tkinter.HORIZONTAL)
     code_hscroll.pack(side=Tkinter.BOTTOM, fill=Tkinter.X)
     code_vscroll = Scrollbar(self.right_frame)
     code_vscroll.pack(side=Tkinter.RIGHT, fill=Tkinter.Y)
     self.code_text = Text(self.right_frame,
                           wrap=Tkinter.NONE,
                           xscrollcommand=code_hscroll.set,
                           yscrollcommand=code_vscroll.set)
     self.code_text.pack()
     self.code_text.insert(Tkinter.INSERT, DEFAULT_CODE)
     code_hscroll.config(command=self.code_text.xview)
     code_vscroll.config(command=self.code_text.yview)
     self.input_file_entry =\
         self.create_and_add_file_field(self.left_frame, "Input file", 5, False)
     self.spherical_coord_option =\
         Radiobutton(self.left_frame, text="Spherical coordinates",
                     variable=self.input_type, value=1)
     self.spherical_coord_option.pack(anchor=Tkinter.W)
     self.cartesian_coord_option =\
         Radiobutton(self.left_frame, text="Cartesian coordinates",
                     variable=self.input_type, value=2)
     self.cartesian_coord_option.pack(anchor=Tkinter.W)
     self.spherical_coord_option.select()
     self.output_file_entry =\
         self.create_and_add_file_field(self.left_frame, "Output file", 5, True)
     self.normalize_check = Checkbutton(self.left_frame,
                                        text="Normalize data",
                                        variable=self.normalize_data,
                                        offvalue=0,
                                        onvalue=1)
     self.normalize_check.pack()
     self.normalize_check.deselect()
     self.do_button = Button(self.left_frame, text="Run", command=self.run)
     self.do_button.pack(side=Tkinter.BOTTOM, pady=(0, 10))
Esempio n. 38
0
    def __init__(self,parent,container,show,active=False,*args,**kwargs):
        LabelFrame.__init__(self,parent,*args,**kwargs)
        # self.items = container.__dict__[show]
        self.active = active
        self.parent = parent
        self.frames = []
        self.show = show
        self.container = container

        self.analyzeData()
        self.initUIElements()
        self.gridUIElements()
Esempio n. 39
0
    def __init_telem(self):
        # телеметрия
        self.w_lf_telem = LabelFrame(self.window, text=u'Телеметрия')
        self.w_l_telem_time = Label(self.w_lf_telem,
                                    text=u'0',
                                    font='Arial 15')
        self.w_l_telem_bat = Label(self.w_lf_telem, text=u'0', font='Arial 15')
        self.w_l_telem_temp = Label(self.w_lf_telem,
                                    text=u'0',
                                    font='Arial 15')
        self.w_l_telem_photo = Label(self.w_lf_telem,
                                     text=u'0',
                                     font='Arial 15')

        self.w_lf_telem.place(relx=0, rely=0.6, relwidth=1, relheight=0.4)

        Label(self.w_lf_telem, text=u'Время:',
              font='Arial 15').place(relx=0,
                                     rely=0,
                                     relwidth=0.5,
                                     relheight=0.25)
        Label(self.w_lf_telem, text=u'Батарея:',
              font='Arial 15').place(relx=0,
                                     rely=0.25,
                                     relwidth=0.5,
                                     relheight=0.25)
        Label(self.w_lf_telem, text=u'Температура:',
              font='Arial 15').place(relx=0,
                                     rely=0.5,
                                     relwidth=0.5,
                                     relheight=0.25)
        Label(self.w_lf_telem, text=u'Освещенность:',
              font='Arial 15').place(relx=0,
                                     rely=0.75,
                                     relwidth=0.5,
                                     relheight=0.25)

        self.w_l_telem_time.place(relx=0.5,
                                  rely=0,
                                  relwidth=0.5,
                                  relheight=0.25)
        self.w_l_telem_bat.place(relx=0.5,
                                 rely=0.25,
                                 relwidth=0.5,
                                 relheight=0.25)
        self.w_l_telem_temp.place(relx=0.5,
                                  rely=0.5,
                                  relwidth=0.5,
                                  relheight=0.25)
        self.w_l_telem_photo.place(relx=0.5,
                                   rely=0.75,
                                   relwidth=0.5,
                                   relheight=0.25)
Esempio n. 40
0
	def showinfo(self):
		infoRecord=LabelFrame(self.window,text='Operation Note')
		infoRecord.place(x=485,y=60)

		sl=Scrollbar(infoRecord)
		sl.pack(side='right',fill='y')
		lb=Listbox(infoRecord,height=25,width=60)
		lb.pack()

		lb['yscrollcommand']=sl.set
		sl['command']=lb.yview

		self.lb=lb
Esempio n. 41
0
    def __init_video(self):
        self.w_lf_video = LabelFrame(self.window, text=u'Видео')
        self.w_l_video = Label(self.w_lf_video,
                               text=u'Выключен',
                               fg='red',
                               font='Arial 20')
        self.w_b_show = Button(self.w_lf_video,
                               text=u'mplayer',
                               command=self.start_mplayer)

        self.w_lf_video.place(relx=0, rely=0.45, relwidth=1, relheight=0.15)
        self.w_l_video.place(relx=0, rely=0, relwidth=0.7, relheight=1)
        self.w_b_show.place(relx=0.7, rely=0, relwidth=0.3, relheight=1)
Esempio n. 42
0
    def __init__(self, x):
        LabelFrame.__init__(self, x)       
#        self.default_font = tkFont.nametofont("TkDefaultFont")
#        self.default_font.configure(family="Helvetica",size=12)
        self.config(relief=GROOVE)
        self.config(borderwidth=2, padx=5, pady=5)
        self.config(text = "Information")
        self.config(labelanchor = "n")

        self.readmeButton = Button(self, text="README", fg="red")
        self.readmeButton.grid(row=0, column=0, sticky="wens")

        self.pack()
Esempio n. 43
0
    def _init_components(self):
        self._panes = PanedWindow(self, orient='horizontal', sashrelief='raised')
        self._panes.pack(expand=True, fill='both')

        self._left_pane = Frame(self._panes, padx=2, pady=2)
        self._right_pane = Frame(self._panes)
        self._panes.add(self._left_pane, width=250)
        self._panes.add(self._right_pane)

        # group name
        group_name_pane = LabelFrame(self._left_pane, text="Group", padx=10, pady=5)
        group_name_pane.pack(fill='x')

        self._group_name = GroupNameLabel(group_name_pane, self._group)
        self._group_name.pack(expand=True, fill='both')

        # group order
        group_order_pane = LabelFrame(self._left_pane, text="Order", padx=10, pady=5)
        group_order_pane.pack(fill='x')

        self._group_order = IntegerContainer(group_order_pane, integer=self._group.order())
        self._group_order.pack(expand=True, fill='both')

        # apex
        self._apex_pane = LabelFrame(self._left_pane, text="Apex", padx=10, pady=5)
        self._apex_pane.pack(expand=True, fill='both')

        self._apex_container = ApexListContainer(self._apex_pane, apex=self._group.apex())
        self._apex_container.pack(expand=True, fill='both')

        # graph controls
        cocliques_frame = LabelFrame(self._left_pane, text="Cocliques", padx=10, pady=5)
        cocliques_frame.pack(fill='x')

        self._cocliques_button = Button(cocliques_frame, text="Calculate", command=self._show_cocliques)
        self._cocliques_button.pack(anchor='nw')

        self._cocliques_container = ListContainer(cocliques_frame)
        self._cocliques_list = Listbox(self._cocliques_container)
        self._cocliques_container.set_listbox(self._cocliques_list)

        # Button(graph_controls, text='Group equivalent vertices').pack(anchor='nw')

        # this is a button that show up instead of graph canvas if we uncheck 'Show graph' checkbox.
        self._show_graph_button = Button(self._right_pane, text='Show graph',
                                         command=self._show_graph_canvas)
        self._graph_canvas = None
        if self._show_graph:
            self._show_graph_canvas()
        else:
            self._show_graph_button.pack()
Esempio n. 44
0
def wybierajZestawZnakow(zestawieZnakow):
    gui = Tk()
    gui.resizable(0, 0)
    gui.title("")
    fra1 = LabelFrame(gui, text="Stary zestaw znaków")
    fra1.pack(padx=2, pady=2)
    var1 = StringVar()
    var1.set(zestawieZnakow[0])
    opt1 = OptionMenu(fra1, var1, *zestawieZnakow)
    opt1.pack(fill="x")
    but1 = Button(fra1, text="Otwieraj plik", command=lambda: gui.destroy())
    but1.pack(fill="x", padx=2, pady=2)
    gui.mainloop()
    return var1.get()
Esempio n. 45
0
    def __init__(self, master=None):
        LabelFrame.__init__(self, master, text="")
        self.master.title("Memory Game")
        self.master.geometry("400x300")
        #self.master.resizable(0,0)
        self.pack(fill="both", expand="yes")

        # Easy level selector
        easylevel = Button(master, text="Easy Level", command=self.levelEasy)
        easylevel.pack()

        # Hard level selector
        hardlevel = Button(master, text="Hard Level", command=self.levelHard)
        hardlevel.pack()
    def show(self):
        self.__root.title(CONST.APP_NAME)
        mainFrame = Frame(self.__root)
        # Configure main frame and make Dialog stretchable (to EAST and WEST)
        top = mainFrame.winfo_toplevel()
        top.rowconfigure(0, weight=1)
        top.columnconfigure(0, weight=1)
        mainFrame.rowconfigure(0, weight=1)
        mainFrame.columnconfigure(0, weight=1)
        mainFrame.grid(sticky='ew')

        # Configure the frames to hold the controls
        # - Frame with input settings
        inputFrame = LabelFrame(mainFrame, text='Input Settings')
        inputFrame.columnconfigure(1, weight=1)
        inputFrame.grid(column=0, row=0, padx=5, pady=5, sticky='ew')
        # - Frame with output settings
        outputFrame = LabelFrame(mainFrame, text='Output Settings')
        outputFrame.columnconfigure(1, weight=1)
        outputFrame.grid(column=0, row=1, padx=5, pady=5, sticky='ew')
        # - Frame with buttons at the bottom of the dialog
        buttonFrame = Frame(mainFrame)
        buttonFrame.grid(column=0, row=2, padx=5, pady=5, sticky='e')

        # Controls for input
        dataSourceFileLabel = Label(inputFrame, text='Data File:', width=15, anchor='w')
        dataSourceFileLabel.grid(column=0, row=1, padx=5, pady=5, sticky='w')
        dataSourceFileEntry = Entry(inputFrame, width=70, textvariable=self.__ctrl.getDataSourceFileEntryVariable())
        dataSourceFileEntry.grid(column=1, row=1, padx=5, pady=5, sticky='ew')
        dataSourceFileButton = Button(inputFrame, text='...', command=self.__ctrl.dataSourceFileEntryVariableHandler)
        dataSourceFileButton.grid(column=2, row=1, padx=5, pady=5, sticky='e')

        # Controls for output
        numberOfDataLinesToMergeLabel = Label(outputFrame, text='Number of rows to merge into this document:', width=35, anchor='w')
        numberOfDataLinesToMergeLabel.grid(column=0, row=2, padx=5, pady=5, sticky='w')
        # numberOfDataLinesToMergeListBox = OptionMenu(outputFrame, self.__ctrl.getSelectedNumberOfLines(), tuple(self.__ctrl.getNumerOfLinesList())) # TODO: implement these two functions in the controller
        numberOfDataLinesToMergeListBox = apply(OptionMenu, (outputFrame, self.__ctrl.getSelectedNumberOfLines()) + tuple(self.__ctrl.getNumerOfLinesList()))
        numberOfDataLinesToMergeListBox.grid(column=1, row=2, padx=5, pady=5, sticky='w')

        # Buttons
        cancelButton = Button(buttonFrame, text='Cancel', width=10, command=self.__ctrl.buttonCancelHandler)
        cancelButton.grid(column=1, row=0, padx=5, pady=5, sticky='e')
        runButton = Button(buttonFrame, text='Run', width=10, command=self.__ctrl.buttonOkHandler)
        runButton.grid(column=2, row=0, padx=5, pady=5, sticky='e')

        # Show the dialog
        mainFrame.grid()
        self.__root.grid()
        self.__root.mainloop()
Esempio n. 47
0
	def __init__(self, root, prtr, settings, log, *arg):
		fn = os.path.join(settings.cmdFolder, "images", "control_xyz.png")
		self.image = Image.open(fn)
		self.photo = ImageTk.PhotoImage(self.image)
		LabelFrame.__init__(self, root, *arg, text="Movement")

		self.app = root
		self.hilite = None
		self.hilitemask = None
		self.settings = settings
		self.printer = prtr
		self.log = log
		
		l = Label(self, text="mm/min")
		l.grid(row=1, column=2)
		
		l = Label(self, text="X/Y Feed Rate:")
		l.grid(row=2, column=1, sticky=E)
		
		self.xyfeed = Spinbox(self, width=10, justify=RIGHT, from_=0, to=MAXFEED)
		self.xyfeed.grid(row=2, column=2)
		self.xyfeed.delete(0, END)
		self.xyfeed.insert(0, settings.xyfeed)
		self.xyfeed.bind("<FocusOut>", self.valxyFeed)
		self.xyfeed.bind("<Leave>", self.valxyFeed)
		
		l = Label(self, text="Z Feed Rate:")
		l.grid(row=3, column=1, sticky=E)
				
		self.zfeed = Spinbox(self, width=10, justify=RIGHT, from_=0, to=MAXFEED)
		self.zfeed.grid(row=3, column=2)
		self.zfeed.delete(0, END)
		self.zfeed.insert(0, settings.zfeed)
		self.zfeed.bind("<FocusOut>", self.valzFeed)
		self.zfeed.bind("<Leave>", self.valzFeed)
		
		self.canvas = Canvas(self, width=self.image.size[0], height=self.image.size[1], *arg)
		self.canvas.create_image((0, 0), image=self.photo, anchor=N+W)
		self.canvas.grid(row=4, column=1, columnspan=2)
		for m in imageMasks:
			self.canvas.create_oval((m[0][0]-mask_rad, m[0][1]-mask_rad, m[0][0]+mask_rad, m[0][1]+mask_rad),
							outline="#FF0000", width=4, tags=m[1], state=HIDDEN)
		self.canvas.bind("<Button-1>", self.OnLeftDown)
		self.canvas.bind("<Motion>", self.OnMotion)
		self.canvas.bind("<Enter>", self.OnEnter)
		self.canvas.bind("<Leave>", self.OnLeave)
		
		self.bAllOff = Button(self, text="Release Motors", command=self.allMotorsOff)	
		self.bAllOff.grid(row=5, column=1, columnspan=2)
	def families(self):
		from Tkinter import LabelFrame
		families_frame = LabelFrame(self.root, height = 100, width = 150, text = "Family selection")
		families_frame.grid(column = 1, row = 1, columnspan = 1, rowspan = 1)

		import scrolledlist
		family = scrolledlist.ScrolledList(families_frame, width = 20, height = 4)
		
		from os import listdir
		families = listdir('/home/case/TLEs')
		
		for i in range(len(families)):	
			family.append(families[i])
		
		family.grid(column = 0, row = 0, columnspan = 1, rowspan = 1)
Esempio n. 49
0
    def _populate(self, frame):

        settings_frame = LabelFrame(frame,
                                    text='Material import',
                                    borderwidth=config.FRAME_BORDER_WIDTH,
                                    relief=config.FRAME_RELIEF)
        settings_frame.grid(column=0,
                            row=0,
                            sticky=W + E + N + S,
                            padx=config.FRAME_PADDING,
                            pady=config.FRAME_PADDING)
        self._create_entry_line(self.source_material_name, 'Source material',
                                None, settings_frame, 0, None)
        self._create_entry_line(self.target_material_name, 'Target material',
                                None, settings_frame, 1, None)
Esempio n. 50
0
    def createWidgets(self):

        self.mainmenu = Menu(self.master)
        self.mainmenu.config(borderwidth=1)
        self.master.config(menu=self.mainmenu)

        self.filemenu = Menu(self.mainmenu)
        self.filemenu.config(tearoff=0)
        self.mainmenu.add_cascade(label='File',
                                  menu=self.filemenu,
                                  underline=0)
        self.filemenu.add_command(label='Apply', command=self.wApplyCB)
        self.filemenu.add_command(label='Cancel', command=self.wCancelCB)

        self.master.grid_rowconfigure(0, weight=1)
        self.master.grid_columnconfigure(0, weight=1)

        w = wFrame = LabelFrame(self.master, text='Set pitch')

        w.grid(row=0, column=0, sticky=NSEW, padx=5, pady=5)
        w.grid_columnconfigure(0, weight=0)
        w.grid_columnconfigure(1, weight=1)

        w = Label(wFrame, text='Pitch (mm) :', anchor=E)
        w.grid(row=0, column=0, sticky=NSEW)

        w = self.wPitch = XFloatEntry(wFrame,
                                      bg='white',
                                      width=10,
                                      borderwidth=2,
                                      justify=LEFT)
        w.grid(row=0, column=1, sticky=NSEW)
        w.enable_color(enable=False)
    def time(self):
        from Tkinter import LabelFrame
        time_frame = LabelFrame(self.root,
                                height=100,
                                width=150,
                                text="Time settings")
        time_frame.grid(column=1, row=0, columnspan=1, rowspan=1)

        from Tkinter import Radiobutton
        time_now = Radiobutton(time_frame, text="Now", variable=time, value=1)
        time_now.grid(column=0, row=0, columnspan=1, rowspan=1)
        time_selection = Radiobutton(time_frame,
                                     text="Select",
                                     variable=time,
                                     value=2)
        time_selection.grid(column=0, row=1, columnspan=1, rowspan=1)
Esempio n. 52
0
	def path(self):
		path_frame=LabelFrame(self.window,text='Input paths',width=450,height=100)
		path_frame.place(x=20,y=60)

		ora_mes=Message(path_frame,text='Excel from ORA:',width=120)
		ora_mes.place(x=10,y=0)
		self.ora_entry=Entry(path_frame,textvariable=self.ora_path,width=35)
		self.ora_entry.place(x=130,y=0)
		ora_button=Button(path_frame,text='Select…',command=self.selectPath1)
		ora_button.place(x=365,y=0)

		calcu_mes=Message(path_frame,text='Calculator:',width=120)
		calcu_mes.place(x=10,y=40)
		self.calcu_entry=Entry(path_frame,textvariable=self.calcu_path,width=35)
		self.calcu_entry.place(x=130,y=40)
		calcu_button=Button(path_frame,text='Select…',command=self.selectPath2)
		calcu_button.place(x=365,y=40)
Esempio n. 53
0
    def _init_components(self):
        self.columnconfigure(0, weight=1)
        self.rowconfigure(0, weight=1)

        # upper pane contains apex list
        upper_pane = ListContainer(self)
        self.apex_list = ApexList(upper_pane, self._apex)
        upper_pane.set_listbox(self.apex_list)

        # buttons pane contain
        buttons_pane = Frame(self)

        self._expand_button = Button(buttons_pane,
                                     text="Expand All",
                                     command=self.apex_list.expand_all)
        self._expand_button.pack(side='left', expand=True, fill='x')

        self._reset_button = Button(buttons_pane,
                                    text="Collapse All",
                                    command=self.apex_list.reset)
        self._reset_button.pack()

        # panel with number search box
        search_pane = LabelFrame(self, text="Find number")

        self._search_box = NumberBox(search_pane,
                                     allow_expression=True,
                                     constraints=Constraints(min=1))
        self._search_box.pack(side='left', expand=True, fill='x')

        self._search_box_initial_bg = self._search_box['bg']
        self._search_box_alert_bg = '#ffaaaa'

        self._search_box.bind('<Return>', self._find_number)
        for event in ('<FocusIn>', '<FocusOut>', '<Key>'):
            self._search_box.bind(event, self._reset_search_box_alert)

        search_number_button = Button(search_pane,
                                      text="Find",
                                      command=self._find_number)
        search_number_button.pack()

        upper_pane.grid(sticky='nesw')
        buttons_pane.grid(row=1, sticky='nesw')
        search_pane.grid(row=2, sticky='nesw')
    def families(self):
        from Tkinter import LabelFrame
        families_frame = LabelFrame(self.root,
                                    height=100,
                                    width=150,
                                    text="Family selection")
        families_frame.grid(column=1, row=1, columnspan=1, rowspan=1)

        import scrolledlist
        family = scrolledlist.ScrolledList(families_frame, width=20, height=4)

        from os import listdir
        families = listdir('/home/case/TLEs')

        for i in range(len(families)):
            family.append(families[i])

        family.grid(column=0, row=0, columnspan=1, rowspan=1)
Esempio n. 55
0
    def createWidgets(self, master):

        #-Set-progress-bar-style-for-custom-thickness--
        s = Style()
        s.theme_use("default")
        s.configure("TProgressbar", thickness=5)
        #----------------------------------------------

        master.grid_rowconfigure(0, weight=1)
        master.grid_columnconfigure(0, weight=1)

        # +++++++++++++++++++++++++++++++

        row = 0
        col = 0
        w = LabelFrame(master, text='Sample positioner status')
        w.grid(row=row, column=col, sticky=NSEW, padx=5, pady=5)
        self.populateDisplayPanel(w)
Esempio n. 56
0
 def GetLabelFrame(self,
                   _Root,
                   _Text,
                   _BgColor=Color.s_LightGrey,
                   _FgColor=Color.s_DarkBlack):
     return LabelFrame(_Root,
                       text=_Text,
                       bg=_BgColor,
                       fg=_FgColor,
                       font=self.m_DefaultFont)
Esempio n. 57
0
    def __init__(self,parent,data,active=False,listFrame=None,*args,**kwargs):
        LabelFrame.__init__(self,parent,*args,**kwargs)
        self.data = data
        self.multiple = False
        if active:
            if type(self.data) == list:
                self.data = dict([(d.__class__.__name__,deepcopy(d)) \
                                  for d in self.data])
                for d in self.data.values():
                    if hasattr(d,"fake"):
                        d.fake = True
                self.multiple = True
            else:
                self.data = deepcopy(data)
                if hasattr(self.data,"fake"):
                    self.data.fake = True
        self.fields = OrderedDict()
        self.parent = parent
        self.listFrame = listFrame
        self.active = active
        self.mappings = {}
        self.typeDict = {}
        self.differs = False
        self.add = None
        self.apply = None
        self.delete = None

        self.classDict = dict([\
                                (str,Entry),\
                                (unicode,Entry),\
                                (MaterialColor,ColorOption),\
                                (list,Entry),\
                                (Mapping,MapFrame),
                                (FileGroup,FileFrame)\
                             ])

        """
                                {GuiClass:(args,kwargsKeys)} - mostly value=...
        """
        self.analyzeData()
        self.initUIElements()
        self.gridUIElements()
Esempio n. 58
0
 def ancestranNetPipe(self):  #Interface
     top = Toplevel()
     top.title("NetworkComparer")
     a = open("NetComp.html", "r").readlines()
     self.queriesAC = []
     quera = 0
     for i in range(len(a)):
         if "START OF QUERIES" in a[i]:
             self.queryOrder = a[i + 1].rstrip().split()
         if "START OF VS. QUERY" in a[i]:
             quera = 1
         if quera == 1:
             self.queriesAC.append(a[i].rstrip().split("\t"))
     self.queriesAC = self.queriesAC[1:len(self.queriesAC) - 1]
     DescriptionLabel = LabelFrame(
         top, text="Select the gene of interest and specify parameters.")
     Description = Label(
         DescriptionLabel,
         text=
         "Select gene of interest from the list below.\nThis tool will generate netComp.html file containing a page similar to\nfirst step of NetworkComparer."
     )
     DescriptionLabel.grid(row=0, column=0)
     Description.grid(row=0)
     self.listbox = Listbox(DescriptionLabel,
                            width=40,
                            height=30,
                            exportselection=0,
                            selectmode=MULTIPLE)
     for gene in self.queriesAC:
         self.listbox.insert(
             END, gene[0] + '   ' + gene[1] + '   ' + gene[2] + '   ' +
             gene[3] + '   ' + gene[4])
     self.listbox.grid(row=1, column=0, rowspan=5, sticky=N + S + E + W)
     scrollbarG = Scrollbar(DescriptionLabel)
     scrollbarG.grid(row=1, column=1, rowspan=5, sticky=S + N)
     scrollbarG.config(command=self.listbox.yview)
     button = Button(top,
                     text="Calculate!",
                     fg="red",
                     font=("Courier", 22),
                     command=self.ancestralNet)
     button.grid(row=1, column=0, columnspan=5, sticky=E + W)