Python Tkinter.DISABLED Examples
The following are 30
code examples of Tkinter.DISABLED().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
Tkinter
, or try the search function
.
Example #1
Source File: Frame_2D_GUI_metric.py From Structural-Engineering with BSD 3-Clause "New" or "Revised" License | 6 votes |
def fill_load_listbox(self,*event): self.b_solve_frame.configure(state=tk.DISABLED, bg='red3') self.frame_solved = 0 self.load_listbox.delete(0,tk.END) color = "pale green" i=0 for x in self.gui_load_list: self.load_listbox.insert(tk.END,'{0},{1:.3f},{2:.3f},{3:.3f},{4:.3f},{5},{6}'.format(x[0],x[1],x[2],x[3],x[4],x[5],x[6])) if i % 2 == 0: self.load_listbox.itemconfigure(i, background=color) else: pass i+=1
Example #2
Source File: Frame_2D_GUI_metric.py From Structural-Engineering with BSD 3-Clause "New" or "Revised" License | 6 votes |
def build_coldwn_gui_table(self,*event): for element in self.column_down_gui_list: element.destroy() del self.column_down_gui_list[:] for i,col in enumerate(self.column_down_inputs): b = tk.Entry(self.coldwn_info_tab,textvariable=col[0], width=12, state=tk.DISABLED) b.grid(row=i+2,column=1) c = tk.Entry(self.coldwn_info_tab,textvariable=col[1], width=8) c.grid(row=i+2,column=2) d = tk.Entry(self.coldwn_info_tab,textvariable=col[2], width=8) d.grid(row=i+2,column=3) e = tk.Entry(self.coldwn_info_tab,textvariable=col[3], width=8) e.grid(row=i+2,column=4) f = tk.Entry(self.coldwn_info_tab,textvariable=col[4], width=8) f.grid(row=i+2,column=5) g = tk.Checkbutton(self.coldwn_info_tab,variable=col[5]) g.grid(row=i+2,column=6) h = tk.Checkbutton(self.coldwn_info_tab,variable=col[6]) h.grid(row=i+2,column=7) self.column_down_gui_list.extend([b,c,d,e,f,g,h])
Example #3
Source File: Frame_2D_GUI.py From Structural-Engineering with BSD 3-Clause "New" or "Revised" License | 6 votes |
def build_bm_gui_table(self,*event): for element in self.beam_gui_list: element.destroy() del self.beam_gui_list[:] for i,bm in enumerate(self.beam_inputs): a = tk.Entry(self.bm_info_tab,textvariable=bm[0], width=8, state=tk.DISABLED) a.grid(row=i+2,column=1, pady=4) b = tk.Entry(self.bm_info_tab,textvariable=bm[1], width=8) b.grid(row=i+2,column=2) c = tk.Entry(self.bm_info_tab,textvariable=bm[2], width=8) c.grid(row=i+2,column=3) d = tk.Entry(self.bm_info_tab,textvariable=bm[3], width=8) d.grid(row=i+2,column=4) self.beam_gui_list.extend([a,b,c,d])
Example #4
Source File: Frame_2D_GUI_metric.py From Structural-Engineering with BSD 3-Clause "New" or "Revised" License | 6 votes |
def remove_last_beam_func(self,*event): if self.beam_count <= 1: pass else: self.b_solve_frame.configure(state=tk.DISABLED, bg='red3') self.beam_count -=1 self.frame_built = 0 self.frame_solved = 0 self.beam_labels.remove(self.beam_inputs[-1][0].get()) self.refesh_span_options() del self.beam_inputs[-1] del self.column_up_inputs[-1] del self.column_down_inputs[-1] #del self.nodetorsion_inputs[-1] self.build_bm_gui_table() self.build_colup_gui_table() self.build_coldwn_gui_table()
Example #5
Source File: root.py From PCWG with MIT License | 6 votes |
def LoadAnalysisFromPath(self, fileName): try: preferences = Preferences.get() preferences.analysisLastOpened = fileName preferences.save() except ExceptionHandler.ExceptionType as e: ExceptionHandler.add(e, "Cannot save preferences") self.analysisFilePathTextBox.config(state=tk.NORMAL) self.analysisFilePathTextBox.delete(0, tk.END) self.analysisFilePathTextBox.insert(0, fileName) self.analysisFilePathTextBox.config(state=tk.DISABLED) self.analysis = None self.analysisConfiguration = None if len(fileName) > 0: try: self.analysisConfiguration = AnalysisConfiguration(fileName) Status.add("Analysis config loaded: %s" % fileName) except ExceptionHandler.ExceptionType as e: ExceptionHandler.add(e, "ERROR loading config")
Example #6
Source File: base_dialog.py From PCWG with MIT License | 6 votes |
def addDatePickerEntry(self, master, title, validation, value, width = None): if value != None: if type(value) == str: textValue = value else: textValue = value.strftime(datePickerFormat) else: textValue = None entry = self.addEntry(master, title + " " + datePickerFormatDisplay, validation, textValue, width = width) entry.entry.config(state=tk.DISABLED) pickButton = tk.Button(master, text="...", command = DatePicker(self, entry, datePickerFormat), width=3, height=1) pickButton.grid(row=(self.row-1), sticky=tk.N, column=self.inputColumn, padx = 160) entry.bindPickButton(pickButton) return entry
Example #7
Source File: pcwg_tool_reborn.py From PCWG with MIT License | 6 votes |
def addDatePickerEntry(self, master, title, validation, value, width = None): if value != None: if type(value) == str: textValue = value else: textValue = value.strftime(datePickerFormat) else: textValue = None entry = self.addEntry(master, title + " " + datePickerFormatDisplay, validation, textValue, width = width) entry.entry.config(state=tk.DISABLED) pickButton = tk.Button(master, text=".", command = DatePicker(self, entry, datePickerFormat), width=3, height=1) pickButton.grid(row=(self.row-1), sticky=tk.N, column=self.inputColumn, padx = 160) clearButton = tk.Button(master, text="x", command = ClearEntry(entry), width=3, height=1) clearButton.grid(row=(self.row-1), sticky=tk.W, column=self.inputColumn, padx = 133) entry.bindPickButton(pickButton) return entry
Example #8
Source File: gpio_simulator.py From mopidy-ttsgpio with Apache License 2.0 | 6 votes |
def initial_simulator(self): root = Tk() root.title("GPIO Simulator") previous = Button(root, text="Previous", command=self.previous) main = Button(root, text="Main button", command=self.main) next = Button(root, text="Next", command=self.next) vol_up = Button(root, text="Vol +", command=self.vol_up) vol_up_long = Button(root, text="Vol + long", command=self.vol_up_long) vol_down = Button(root, text="Vol -", command=self.vol_down) vol_down_long = Button(root, text="Vol - long", command=self.vol_down_long) main_long = Button(root, text="Main long", command=self.main_long) self.playing_led = Checkbutton(text="playing_led", state=DISABLED) vol_up.grid(row=0, column=1) vol_up_long.grid(row=0, column=2) previous.grid(row=1, column=0) main.grid(row=1, column=1) main_long.grid(row=1, column=2) next.grid(row=1, column=3) vol_down.grid(row=2, column=1) vol_down_long.grid(row=2, column=2) self.playing_led.grid(row=3, column=1) root.mainloop()
Example #9
Source File: Frame_2D_GUI.py From Structural-Engineering with BSD 3-Clause "New" or "Revised" License | 6 votes |
def build_coldwn_gui_table(self,*event): for element in self.column_down_gui_list: element.destroy() del self.column_down_gui_list[:] for i,col in enumerate(self.column_down_inputs): b = tk.Entry(self.coldwn_info_tab,textvariable=col[0], width=12, state=tk.DISABLED) b.grid(row=i+2,column=1) c = tk.Entry(self.coldwn_info_tab,textvariable=col[1], width=8) c.grid(row=i+2,column=2) d = tk.Entry(self.coldwn_info_tab,textvariable=col[2], width=8) d.grid(row=i+2,column=3) e = tk.Entry(self.coldwn_info_tab,textvariable=col[3], width=8) e.grid(row=i+2,column=4) f = tk.Entry(self.coldwn_info_tab,textvariable=col[4], width=8) f.grid(row=i+2,column=5) g = tk.Checkbutton(self.coldwn_info_tab,variable=col[5]) g.grid(row=i+2,column=6) h = tk.Checkbutton(self.coldwn_info_tab,variable=col[6]) h.grid(row=i+2,column=7) self.column_down_gui_list.extend([b,c,d,e,f,g,h])
Example #10
Source File: Frame_2D_GUI.py From Structural-Engineering with BSD 3-Clause "New" or "Revised" License | 6 votes |
def fill_load_listbox(self,*event): self.b_solve_frame.configure(state=tk.DISABLED, bg='red3') self.frame_solved = 0 self.load_listbox.delete(0,tk.END) color = "pale green" i=0 for x in self.gui_load_list: self.load_listbox.insert(tk.END,'{0},{1:.3f},{2:.3f},{3:.3f},{4:.3f},{5},{6}'.format(x[0],x[1],x[2],x[3],x[4],x[5],x[6])) if i % 2 == 0: self.load_listbox.itemconfigure(i, background=color) else: pass i+=1
Example #11
Source File: tkgui.py From ATX with Apache License 2.0 | 5 votes |
def _run_check_refresh(self): auto = self._auto_refresh_var.get() state = tk.DISABLED if auto else tk.NORMAL self._btn_refresh.config(state=state)
Example #12
Source File: Frame_2D_GUI.py From Structural-Engineering with BSD 3-Clause "New" or "Revised" License | 5 votes |
def remove_left_cant_func(self,*event): if self.cantL_count > 0: self.frame_built = 0 self.frame_solved = 0 self.cantL_count -=1 self.beam_labels.remove('CantL') self.refesh_span_options() self.b_remove_left_cant.configure(state=tk.DISABLED) self.b_solve_frame.configure(state=tk.DISABLED, bg='red3') self.b_add_left_cant.configure(state=tk.NORMAL) for element in self.cantL_beam_gui_list: element.destroy() del self.cantL_beam_gui_list[:]
Example #13
Source File: Frame_2D_GUI.py From Structural-Engineering with BSD 3-Clause "New" or "Revised" License | 5 votes |
def remove_right_cant_func(self,*event): if self.cantR_count > 0: self.frame_built = 0 self.frame_solved = 0 self.cantR_count -=1 self.beam_labels.remove('CantR') self.refesh_span_options() self.b_remove_right_cant.configure(state=tk.DISABLED) self.b_add_right_cant.configure(state=tk.NORMAL) self.b_solve_frame.configure(state=tk.DISABLED, bg='red3') for element in self.cantR_beam_gui_list: element.destroy() del self.cantR_beam_gui_list[:]
Example #14
Source File: Frame_2D_GUI.py From Structural-Engineering with BSD 3-Clause "New" or "Revised" License | 5 votes |
def add_cant_right_func(self,*event): if self.cantR_count == 0: self.frame_built = 0 self.frame_solved = 0 self.cantR_count +=1 self.b_remove_right_cant.configure(state=tk.NORMAL) self.b_add_right_cant.configure(state=tk.DISABLED) self.b_solve_frame.configure(state=tk.DISABLED, bg='red3') self.cantR_beam_inputs.append([tk.StringVar(),tk.StringVar(),tk.StringVar(),tk.StringVar()]) self.cantR_beam_inputs[-1][1].set(5) self.cantR_beam_inputs[-1][2].set(29000) self.cantR_beam_inputs[-1][3].set(30.8) bm = self.cantR_beam_inputs[0] bm[0].set('CantR') self.beam_labels.append('CantR') self.refesh_span_options() a = tk.Entry(self.bm_info_tab,textvariable=bm[0], width=8, state=tk.DISABLED) a.grid(row=2,column=11) b = tk.Entry(self.bm_info_tab,textvariable=bm[1], width=8) b.grid(row=2,column=12) c = tk.Entry(self.bm_info_tab,textvariable=bm[2], width=8) c.grid(row=2,column=13) d = tk.Entry(self.bm_info_tab,textvariable=bm[3], width=8) d.grid(row=2,column=14) self.cantR_beam_gui_list.extend([a,b,c,d]) else: pass
Example #15
Source File: Frame_2D_GUI.py From Structural-Engineering with BSD 3-Clause "New" or "Revised" License | 5 votes |
def build_colup_gui_table(self,*event): for element in self.column_up_gui_list: element.destroy() del self.column_up_gui_list[:] for i,col in enumerate(self.column_up_inputs): a = tk.Checkbutton(self.colup_info_tab,variable=col[0]) a.grid(row=i+2,column=1) b = tk.Entry(self.colup_info_tab,textvariable=col[1], width=12, state=tk.DISABLED) b.grid(row=i+2,column=2) c = tk.Entry(self.colup_info_tab,textvariable=col[2], width=8) c.grid(row=i+2,column=3) d = tk.Entry(self.colup_info_tab,textvariable=col[3], width=8) d.grid(row=i+2,column=4) e = tk.Entry(self.colup_info_tab,textvariable=col[4], width=8) e.grid(row=i+2,column=5) f = tk.Entry(self.colup_info_tab,textvariable=col[5], width=8) f.grid(row=i+2,column=6) g = tk.Checkbutton(self.colup_info_tab,variable=col[6]) g.grid(row=i+2,column=7) h = tk.Checkbutton(self.colup_info_tab,variable=col[7]) h.grid(row=i+2,column=8) self.column_up_gui_list.extend([a,b,c,d,e,f,g,h])
Example #16
Source File: Frame_2D_GUI.py From Structural-Engineering with BSD 3-Clause "New" or "Revised" License | 5 votes |
def add_load_gui(self,*event): span = self.load_span_select.get() w1 = float(self.w1_gui.get()) w2 = float(self.w2_gui.get()) a = float(self.a_gui.get()) b = float(self.b_gui.get()) type = self.load_type.get() kind = self.load_kind_select.get() self.gui_load_list.append([span,w1,w2,a,b,type,kind]) self.b_change_load.configure(state=tk.DISABLED, bg='gray75') self.b_remove_load.configure(state=tk.DISABLED, bg='gray75') self.fill_load_listbox()
Example #17
Source File: Frame_2D_GUI.py From Structural-Engineering with BSD 3-Clause "New" or "Revised" License | 5 votes |
def remove_load_gui(self,*event): if len(self.gui_load_list)==0: pass else: del self.gui_load_list[self.load_change_index] self.b_change_load.configure(state=tk.DISABLED, bg='gray75') self.b_remove_load.configure(state=tk.DISABLED, bg='gray75') self.fill_load_listbox()
Example #18
Source File: Frame_2D_GUI.py From Structural-Engineering with BSD 3-Clause "New" or "Revised" License | 5 votes |
def remove_all_loads_gui(self,*event): if len(self.gui_load_list)==0: pass else: del self.gui_load_list[:] self.b_change_load.configure(state=tk.DISABLED, bg='gray75') self.b_remove_load.configure(state=tk.DISABLED, bg='gray75') self.fill_load_listbox()
Example #19
Source File: menotexport-gui.py From Menotexport with GNU General Public License v3.0 | 5 votes |
def doRis(self): if self.isris.get()==1: print('# <Menotexport>: Export to .ris file.') self.check_iszotero.configure(state=tk.NORMAL) else: print('# <Menotexport>: Dont export .ris file.') if self.isbib.get()==0: self.check_iszotero.configure(state=tk.DISABLED) self.checkReady()
Example #20
Source File: base_dialog.py From PCWG with MIT License | 5 votes |
def addEntry(self, master, title, validation, value, width = None, read_only = False): variable = tk.StringVar(master, value) label = tk.Label(master, text=title) label.grid(row = self.row, sticky=tk.W, column=self.labelColumn) tipLabel = tk.Label(master, text="") tipLabel.grid(row = self.row, sticky=tk.W, column=self.tipColumn) if validation != None: validation.messageLabel.grid(row = self.row, sticky=tk.W, column=self.messageColumn) validation.title = title self.validations.append(validation) validationCommand = validation.CMD else: validationCommand = None entry = tk.Entry(master, textvariable=variable, validate = 'key', validatecommand = validationCommand, width = width) if read_only: entry.config(state=tk.DISABLED) entry.grid(row=self.row, column=self.inputColumn, sticky=tk.W) if validation != None: validation.link(entry) self.row += 1 return VariableEntry(variable, entry, tipLabel)
Example #21
Source File: root.py From PCWG with MIT License | 5 votes |
def LoadPortfolioFromPath(self, fileName): try: preferences = Preferences.get() preferences.portfolioLastOpened = fileName preferences.save() except ExceptionHandler.ExceptionType as e: ExceptionHandler.add(e, "Cannot save preferences") self.portfolioFilePathTextBox.config(state=tk.NORMAL) self.portfolioFilePathTextBox.delete(0, tk.END) self.portfolioFilePathTextBox.insert(0, fileName) self.portfolioFilePathTextBox.config(state=tk.DISABLED) self.portfolioConfiguration = None if len(fileName) > 0 and os.path.isfile(fileName): try: self.portfolioConfiguration = PortfolioConfiguration(fileName) Status.add("Portfolio config loaded: %s" % fileName) except ExceptionHandler.ExceptionType as e: ExceptionHandler.add(e, "ERROR loading config") else: self.portfolioConfiguration = None
Example #22
Source File: ScribusGenerator.py From ScribusGenerator with MIT License | 5 votes |
def updateState(self, value): if(value == CONST.FORMAT_PDF): self.keepGeneratedScribusFilesLabel.configure(state=NORMAL) self.keepGeneratedScribusFilesCheckbox.configure(state=NORMAL) else: self.keepGeneratedScribusFilesLabel.configure(state=DISABLED) self.keepGeneratedScribusFilesCheckbox.configure(state=DISABLED)
Example #23
Source File: menotexport-gui.py From Menotexport with GNU General Public License v3.0 | 5 votes |
def checkReady(self): if self.isexport.get()==1 or self.ishighlight.get()==1\ or self.isnote.get()==1 or self.isbib.get()==1: self.hasaction=True else: self.hasaction=False if self.hasdb and self.hasout and self.hasaction: self.start_button.configure(state=tk.NORMAL) print('# <Menotexport>: Menotexport Ready.') else: self.start_button.configure(state=tk.DISABLED)
Example #24
Source File: menotexport-gui.py From Menotexport with GNU General Public License v3.0 | 5 votes |
def doHighlight(self): if self.ishighlight.get()==1: print('# <Menotexport>: Extract highlighted texts.') self.check_separate.configure(state=tk.NORMAL) self.check_custom_template.configure(state=tk.NORMAL) else: print('# <Menotexport>: Dont extract highlighted texts.') if self.isnote.get()==0: self.check_separate.configure(state=tk.DISABLED) self.check_custom_template.configure(state=tk.DISABLED) self.checkReady()
Example #25
Source File: menotexport-gui.py From Menotexport with GNU General Public License v3.0 | 5 votes |
def doNote(self): if self.isnote.get()==1: print('# <Menotexport>: Extract notes.') self.check_separate.configure(state=tk.NORMAL) self.check_custom_template.configure(state=tk.NORMAL) else: print('# <Menotexport>: Dont extract notes.') self.check_separate.state=tk.DISABLED if self.ishighlight.get()==0: self.check_separate.configure(state=tk.DISABLED) self.check_custom_template.configure(state=tk.DISABLED) self.checkReady() self.checkReady()
Example #26
Source File: menotexport-gui.py From Menotexport with GNU General Public License v3.0 | 5 votes |
def doBib(self): if self.isbib.get()==1: print('# <Menotexport>: Export to .bib file.') self.check_iszotero.configure(state=tk.NORMAL) else: print('# <Menotexport>: Dont export .bib file.') if self.isris.get()==0: self.check_iszotero.configure(state=tk.DISABLED) self.checkReady()
Example #27
Source File: graph_canvas.py From networkx_viewer with GNU General Public License v3.0 | 5 votes |
def onTokenRightClick(self, event): item = self._get_id(event) popup = tk.Menu(self, tearoff=0) popup.add_command(label='Grow', command=lambda: self.grow_node(item), accelerator='G') popup.add_command(label='Grow until...', command=lambda: self.grow_until(item)) popup.add_command(label='Mark', command=lambda: self.mark_node(item), accelerator='M') popup.add_command(label='Hide', command=lambda: self.hide_node(item), accelerator='H') hide_behind = tk.Menu(popup, tearoff=0) for _, n in self.dispG.edges_iter(item): assert _ == item if self._radial_behind(item, n): state = tk.ACTIVE else: state = tk.DISABLED hide_behind.add_command(label=str(self.dispG.node[n]['dataG_id']), state=state, command=lambda item=item, n=n: self.hide_behind(item, n)) popup.add_cascade(label='Hide Behind', menu=hide_behind) token = self.dispG.node[item]['token'] token.customize_menu(popup, item) try: popup.post(event.x_root, event.y_root) finally: popup.grab_release()
Example #28
Source File: nsf2x.py From nsf2x with GNU General Public License v2.0 | 5 votes |
def configPasswordEntry(self): """Gui Password Entry Configuration""" self.startButton.config(text=_("Open Sessions"), state=tkinter.NORMAL) self.chooseNsfButton.config(text=_("Select Directory of SOURCE nsf files"), state=tkinter.DISABLED) self.chooseDestButton.config(text=_("Select Directory of DESTINATION files"), state=tkinter.DISABLED) self.entryPassword.config(state=tkinter.NORMAL) self.formatTypeEML.config(state=tkinter.DISABLED) self.formatTypeMBOX.config(state=tkinter.DISABLED) self.formatTypePST.config(state=tkinter.DISABLED) self.optionsButton.config(state=tkinter.DISABLED)
Example #29
Source File: EDMarketConnector.py From EDMarketConnector with GNU General Public License v2.0 | 5 votes |
def login(self): if not self.status['text']: self.status['text'] = _('Logging in...') self.button['state'] = self.theme_button['state'] = tk.DISABLED if platform == 'darwin': self.view_menu.entryconfigure(0, state=tk.DISABLED) # Status self.file_menu.entryconfigure(0, state=tk.DISABLED) # Save Raw Data else: self.file_menu.entryconfigure(0, state=tk.DISABLED) # Status self.file_menu.entryconfigure(1, state=tk.DISABLED) # Save Raw Data self.w.update_idletasks() try: if companion.session.login(monitor.cmdr, monitor.is_beta): self.status['text'] = _('Authentication successful') # Successfully authenticated with the Frontier website if platform == 'darwin': self.view_menu.entryconfigure(0, state=tk.NORMAL) # Status self.file_menu.entryconfigure(0, state=tk.NORMAL) # Save Raw Data else: self.file_menu.entryconfigure(0, state=tk.NORMAL) # Status self.file_menu.entryconfigure(1, state=tk.NORMAL) # Save Raw Data except (companion.CredentialsError, companion.ServerError, companion.ServerLagging) as e: self.status['text'] = unicode(e) except Exception as e: if __debug__: print_exc() self.status['text'] = unicode(e) self.cooldown()
Example #30
Source File: EDMarketConnector.py From EDMarketConnector with GNU General Public License v2.0 | 5 votes |
def cooldown(self): if time() < self.holdofftime: self.button['text'] = self.theme_button['text'] = _('cooldown {SS}s').format(SS = int(self.holdofftime - time())) # Update button in main window self.w.after(1000, self.cooldown) else: self.button['text'] = self.theme_button['text'] = _('Update') # Update button in main window self.button['state'] = self.theme_button['state'] = (monitor.cmdr and monitor.mode and not monitor.state['Captain'] and monitor.system and tk.NORMAL or tk.DISABLED)