199 Topics
| |
Hi everyone, I recently installed Python on Windows. I wanted to develop a gui program using Tkinter. The problem is that when I try to import Tkinter module. It gives me a 'module not found' error. But I thought Tkinter was preintalled within Python's installation. It is even more confusing … | |
Trying use radio buttons to select which host I'm referring to since ultimately there will only be two and they are fixed addresses. This is the error: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1410, in call return self.func(*args) File "Untitled 2.py", line 63, in command=lambda: callback_power_off(off, host)) File "Untitled 2.py", line 28, in … | |
How would I be able to have a button that's command is to return it's text in the button to a variable | |
Why is this not working, no errors? photo exists in correct position... gui doesnt alwyas show up, image doesnt. Using python 3 from tkinter import * from random import * import time mainGUI = Tk() width2= 319 height2 = 240 widthOfScreen = mainGUI.winfo_screenwidth() #Get the width of the screen heightOfScreen … | |
I used code originally by vegaseat what's wrong with code ** error : Traceback (most recent call last): File "C:/Users/Cameron/Computing Work/Year 13/F454 - Computing Project/Design/newthingnewthing.py", line 68, in <module> canvas.create_rectangle(x0, y0, x1, y1, fill="purple") AttributeError: 'NoneType' object has no attribute 'create_rectangle'** _______________________________________________ code: from tkinter import * data = [10, … | |
Shows you how to create multiple Tkinter buttons in a loop, each with its own name, label and command response. | |
The code sample shows how to get an image from the internet and show it in a Tkinter label widget. | |
I'm programming a UI mock-up and need to make the window of fixed size and position. The lines of code for setting the size are as follows : widthOfScreen = mainGUI.winfo_screenwidth() #Get the width of the screen heightOfScreen = mainGUI.winfo_screenheight() #Get the height of the screen mainGUI.geometry("%dx%d+0+0" % (widthOfScreen, heightOfScreen)) … | |
I am creating a basic hangman game using tkinter. The last thing that I need to do is to add a widget that has an image to show the actual hangman. However, I keep getting this error whenever I try anything: File "C:\Program Files (x86)\Python\lib\tkinter\__init__.py", line 3287, in __init__ Image.__init__(self, … | |
Hi, im new to this forum, im trying to make a text editor in python for my school, and its nearly finished, but whenever i save a text file then open it again it makes weird square symbols at the end of each line. Thanks in advance. And i didn't … | |
Anyone creating an OS with Python (Tkinter)? | |
Hello, I am working on a Tk program that generates geometric patterns, and I have written into all of my defs that if the variable "outline" is True it will draw a black outline, otherwise it will draw an outline the same as the fill. I tried a function called … | |
Hello , I am making tries to display images in different tkinter windows , in every window displaying a different image , for this i made this code : # -*- coding: cp1252 -*- from Tkinter import * import Tkinter as tk import ttk from PIL import ImageTk, Image import … | |
newbie question, but please i need help i just started learning gui programming on python, been getting this error on a code am writing concerning uising the get() method to read an integer from my entry box from Tkinter import * root=Tk() var=StringVar() label=Label(root, textvariable=var, relief=RAISED) var.set("converter") label.pack() L1=Label(text="x:") L1.pack(side= … | |
So, I'm coding a IDE in Python and I'm using Tkinter for the GUI. What I'm looking for is a way to add a "recent files" menu to the menu that opens when you right click the program's icon in Windows's task bar. I have a picture to show what … | |
import serial import threading import Queue import Tkinter as tk class SerialThread(threading.Thread): def __init__(self, queue): threading.Thread.__init__(self) self.queue = queue def run(self): s = serial.Serial('COM10',9600) while True: if s.inWaiting(): text = s.readline(s.inWaiting()) self.queue.put(text) class App(tk.Tk): def __init__(self): tk.Tk.__init__(self) self.geometry("1360x750") frameLabel = tk.Frame(self, padx=40, pady =40) self.text = tk.Text(frameLabel, wrap='word', font='TimesNewRoman 37', … | |
Hello everyone I'm building my first app using Python TkInter and i would like to have someone help me with this I want to make a checkbox by default it should be False (Unchecked) And make it do something like (Sorry i only know how to do it on visual … | |
Hello Guys I am trying to make a game with Tkinter. It involves selecting different options from a set of buttons. I created a root for the window, and am done with all the basic game programming. Its a football league simulator allowing players to select a team and choose … | |
How could I pass value entered by user, using tkinter’s Entry to another object? I manage to print it, but couldn’t sent it further… Here are parts of the code: def novo_vreme(): vreme1 = Vreme() root1 = Toplevel(root) root1.title("Vreme") naziv = "Vreme" L1 = Label(root1, text="Zadržavanje: ") L1.place(x=10, y=30) E1 … | |
I have been working with numbers in tkinter using operators but I'm unsure on how to process the input and using maths on them. I also wouldn't mind knowing how to use words either for future reference. Reply if you know anything. | |
Simple code to show you how to display an image from a Web URL using the Tkinter Python GUI toolkit, the Python Image Library (PIL) and the data_stream created with io.BytesIO(). | |
This Python snippet shows how to control a VPython visual 3D sphere with Tkinter GUI toolkit button clicks. | |
A short code to show you how you can download and display an image from the internet on Python's Tkinter GUI toolkit. | |
The problem is explained by the comments in the code. It is a fundamental question about the method call...every time I try text_box_name.tk_textBackspace() I get the TclError message. That's why I asked the question without the code... # When user enters a search word in the +search_box' text widget and … | |
A closer look at the Tkinter GUI toolkit Toplevel Window and how to lift and lower it respective to other windows. | |
This little experiment with Tkinter and pixel drawing shows some strange effects (look at line 27 comments!!!): '''tk_put_pixel.py place a pixel at pos=(x,y) with color=(r,g,b) on an image area note: one pixel might be hard to see, so create a series of pixels (line) ''' try: # Python2 import Tkinter … | |
Hi I am struggling with the Tkinter (ttk) Treeview. I want to allow the user to select multiple items in the Treeview using Shift and clicking. However I then want to be able to right click on the selection, or drag the selection using the normal left mouse button (B1). … | |
Hi I am busy building a small Python app in which I have two tkinter (ttk) Treeview widgets. I want to be able to drag an item (or multiple selected items) from the one treeview to the other, having the dragged items added to the treeview where they are dropped. … | |
I apologise in advance but I have resorted to posting all of my code as I'm really struggling on this! I have created a table which is initially empty then a user imports a text file and creates 'n' rows depending on the content. Each row has an option menu … | |
I have the following code where I have several small problems. I have included some comments as I can't seem to get my 'pop up menu' button to work in order to retrieve the number of columns requested by the user. I then need to be able to get the … |
The End.