¡@

Home 

python Programming Glossary: tk.tk

New Python Programmer Looking for Help to Avoid Recursion with tkinter

http://stackoverflow.com/questions/10039485/new-python-programmer-looking-for-help-to-avoid-recursion-with-tkinter

comes from import tkinter as tk class Application tk.Tk def __init__ self tk.Tk.__init__ self self.title 'Hello world.. tkinter as tk class Application tk.Tk def __init__ self tk.Tk.__init__ self self.title 'Hello world ' self.quitButton tk.Button.. import tkinter as tk import tkFont class Application tk.Tk def __init__ self tk.Tk.__init__ self self.title 'T Pad' # Menubar..

Correct way to implement a custom popup tkinter dialog box

http://stackoverflow.com/questions/10057672/correct-way-to-implement-a-custom-popup-tkinter-dialog-box

print 'Username ' username username 'Empty' root tk.Tk mainLabel tk.Label root text 'Example for pop up input box'..

Tkinter locks python when Icon loaded and tk.mainloop in a thread

http://stackoverflow.com/questions/1198262/tkinter-locks-python-when-icon-loaded-and-tk-mainloop-in-a-thread

thread from time import sleep if __name__ '__main__' t tk.Tk thread.start_new_thread t.mainloop # t.iconbitmap 'icon.ico'.. will work no extra threads if __name__ '__main__' t tk.Tk t.iconbitmap 'icon.ico' b tk.Button text 'test' command exit.. b.grid row 0 t.mainloop with extra thread def threadmain t tk.Tk t.iconbitmap 'icon.ico' b tk.Button text 'test' command exit..

How to connect a progress bar to a function?

http://stackoverflow.com/questions/15323574/how-to-connect-a-progress-bar-to-a-function

s finished... x self.queue.put msg self.running False root tk.Tk client ThreadedClient root root.mainloop This code is based.. the new thread. # Import statements are the same class App tk.Tk def __init__ self tk.Tk.__init__ self self.queue Queue.Queue.. statements are the same class App tk.Tk def __init__ self tk.Tk.__init__ self self.queue Queue.Queue self.listbox tk.Listbox..

Python tkinter program structure

http://stackoverflow.com/questions/17466561/python-tkinter-program-structure

def funB2 .... def funC def funC1 .... def funC2 .... root tk.Tk button1 tk.Button root ... command funA button1.pack button2.. create the rest of your GUI here if __name__ __main__ root tk.Tk MainApplication root .pack side top fill both expand True root.mainloop..

Code a timer in a python GUI in TKinter

http://stackoverflow.com/questions/2400262/code-a-timer-in-a-python-gui-in-tkinter

as tk import time class App def __init__ self self.root tk.Tk self.label tk.Label text self.label.pack self.update_clock self.root.mainloop..

Adding a scrollbar to a grid of widgets in Tkinter

http://stackoverflow.com/questions/3085696/adding-a-scrollbar-to-a-grid-of-widgets-in-tkinter

self.canvas.bbox all if __name__ __main__ root tk.Tk Example root .pack side top fill both expand True root.mainloop..

Python images display

http://stackoverflow.com/questions/3166221/python-images-display

import Tkinter as tk from PIL import Image ImageTk root tk.Tk root.title 'background image' # pick an image file you have..

Advanced Tkinter text box?

http://stackoverflow.com/questions/3732605/advanced-tkinter-text-box

checking. import Tkinter as tk import tkFont class App tk.Tk def __init__ self tk.Tk.__init__ self ## Toolbar self.toolbar.. as tk import tkFont class App tk.Tk def __init__ self tk.Tk.__init__ self ## Toolbar self.toolbar tk.Frame self.bold tk.Button..

Python/Tkinter: Interactively validating Entry widget content

http://stackoverflow.com/questions/4140437/python-tkinter-interactively-validating-entry-widget-content

Tkinter as tk class MyApp def __init__ self self.root tk.Tk # valid percent substitutions from the Tk entry man page # d..

Tkinter: How do widgets update?

http://stackoverflow.com/questions/5781286/tkinter-how-do-widgets-update

the event loop. For example import Tkinter as tk class App tk.Tk def __init__ self args kwargs tk.Tk.__init__ self args kwargs.. as tk class App tk.Tk def __init__ self args kwargs tk.Tk.__init__ self args kwargs self.label tk.Label self text width..

board-drawing code to move an oval

http://stackoverflow.com/questions/6740855/board-drawing-code-to-move-an-oval

an item on a canvas import Tkinter as tk class SampleApp tk.Tk '''Illustrate how to drag items on a Tkinter canvas''' def __init__.. items on a Tkinter canvas''' def __init__ self args kwargs tk.Tk.__init__ self args kwargs # create a canvas self.canvas tk.Canvas..

a downloading progress bar in ttk

http://stackoverflow.com/questions/7310511/a-downloading-progress-bar-in-ttk

rough idea import Tkinter as tk import ttk class SampleApp tk.Tk def __init__ self args kwargs tk.Tk.__init__ self args kwargs.. ttk class SampleApp tk.Tk def __init__ self args kwargs tk.Tk.__init__ self args kwargs self.button ttk.Button text start..

Python, tkinter, changing the window basics

http://stackoverflow.com/questions/7546050/python-tkinter-changing-the-window-basics

Tkinter as tk TITLE_FONT Helvetica 18 bold class SampleApp tk.Tk def __init__ self args kwargs tk.Tk.__init__ self args kwargs.. bold class SampleApp tk.Tk def __init__ self args kwargs tk.Tk.__init__ self args kwargs # the container is where we'll stack..

Display fullscreen mode on Tkinter

http://stackoverflow.com/questions/7966119/display-fullscreen-mode-on-tkinter

self.master.geometry self._geom self._geom geom root tk.Tk app FullScreenApp root root.mainloop share improve this answer..