Tagged Questions
0
votes
0answers
13 views
How do I prepopulate a text field with suggested text in Tkinter?
I'm trying to prepopulate a text field based on the most recent entry. As this is not a Listbox, I don't see how to do it, and I'm not seeing any examples on the web. Thanks.
0
votes
1answer
11 views
tkinter and configparser : looking for a more beautiful solution
I want to use config.ini's values as startup values for Tkinter Entry items.
When the program is finished, I want to write the content of these Entry into the config.ini.
I have 2 problems with the ...
1
vote
0answers
10 views
How to hide or disable the mouse pointer in Tkinter?
I have a fullscreen Tkinter Python application which does not need the mouse -- a simplified version is below. It opens fullscreen and activates a text widget upon pressing F1.
import Tkinter as tk
...
0
votes
1answer
13 views
__init__ in GUI with tkinter
I am learning to create simple GUIs with python using Tkinter. I am currently using the python documentation as reference (link).
First thing I am trying to do is understand the sample code there. I ...
1
vote
1answer
22 views
radio buttons tkinter passing host value
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 ...
0
votes
1answer
19 views
How do I correct this function to create a label in Tkinter Python?
can you help me correct this so I get a label appearing please :)? I dont think the 2 functions are properly written, I am new and need some help... FYI the 'convert' function is commanded by the ...
0
votes
2answers
14 views
Unable to call Tkinter module in Python2.7 for some reason
I am unable to call Tkinter from text editor(sublime) OR interpreter..
I did a fresh Debian install on Virtualbox with ActivePython2.7
Here is a video on 1.5min for easier explanation on my problem!
...
3
votes
2answers
22 views
Radiobutton modifying increment values in spinbox Python
I'm trying to create a GUI in Python 2.7 with Tkinter. I need that the increment value from my Spinbox changes accordingly to a value selected from a selection of Radiobutton. I've tried different ...
0
votes
0answers
16 views
Placing text from python to windows 8 clipboard
I've searched around on stackoverflow and I can't seem to understand how you would copy a string input into the windows clipboard. So what I want to do right now is to take a string in a program in ...
1
vote
1answer
42 views
tkinter and scrabble solver problems
I have had to learn python 3.3.3 for a logic and design class. I am extremely new at programming and the code below is the culmination of what ive learned on my own in 10 weeks. I had my program ...
1
vote
1answer
20 views
Tkinter - How to create submenus in menubar
Is it possible? By looking at the options I'm stumped. Searching on the web hasn't lead me anywhere. Can I create a submenu in the menubar. I'm referring to doing something similar to Idle Shell when ...
0
votes
1answer
17 views
Tkinter text split and output program
I want to make a GUI program with Tkinter which would take in the text and then display all the sentences of the text one by one, moving on, when i click button 'Next'. Problem is that I have no ...
1
vote
3answers
16 views
Sticky=W by default for all objects (Tkinter)
Is it possible to have sticky=W by default for grid positionning in tkinter ?
Label(master, text="First").grid(row=0, sticky=W)
Label(master, text="Second").grid(row=1, sticky=W)
...
This would ...
0
votes
1answer
25 views
Having some trouble getting which radio button is selected and issuing a command based on the selection
I'm writing a program that converts an image to grayscale. I have it working fine and now I'm implementing radio buttons to let the user choose which type of grayscale to use. So far my problem is ...
1
vote
1answer
30 views
Entry string not being added to listbox
Could anyone help me debug this? The listbox isn't updating, and I'm not sure if the entry text (ment) is even transferring to the method.
def NewTask():
ment = StringVar()
top = Toplevel()
...
3
votes
1answer
45 views
Tkinter Draw Problems
I just finished writing a Tkinter based GUI of the board game Othello for a programming class. Everything seems to be working correctly, but something strange is still happening: any changes that ...
0
votes
1answer
27 views
python tkinter open window with button
I am trying to write some code like this in Python tkinter
I want the NewWinButton can only create ONE new window at the time, which means if
if NewWin.winfo_exists() == 1:
...
0
votes
1answer
23 views
Python:Tkinter — How do I get cursor to show busy status
I'm trying to make Tkinter show a busy cursor. Unfortunately, I must be missing something terribly obvious. Following is a very simple program that reproduces my problem:
from Tkinter import *
...
1
vote
1answer
21 views
Tkinter Button callback execute before being pushed [duplicate]
My script seems to execute the buttons and their callbacks on startup, not as when pushed as I would think. what am i doing wrong?
The calls also don't seem to re-execute after the script has ...
0
votes
2answers
50 views
Python 3.3 GUI Program
Celsius to Fahrenheit-- Write a GUI program that converts Celsius temperatures to Fahrenheit temperatures. The user should be able to enter a Celsius temperature, click a button, and then see the ...
0
votes
1answer
26 views
Python Tkinter - .py file doesn't work when double clicked
I am running Windows 7 and have Python 3.3 64 bit installed. I seem to have a problem importing the tkinter module, I can import it fine through the python IDLE and it will work, but when I save the ...
1
vote
1answer
55 views
python 3.3 GUI Programing
I have this code written for a GUI program. The question is Question 1 – Chapter 14 – Question 6 –
Joe’s Automotive performs the following routine maintenance services:
Oil Change--$26.00
Lube ...
2
votes
2answers
35 views
How do you validate a window in Tkinter?
def createWidgets(self):
self.INSTRUCTIONS = Button(self) #creating button linked to instructions_window
self.INSTRUCTIONS["text"] = "Instructions"
self.INSTRUCTIONS["fg"] = ...
1
vote
1answer
46 views
Python loop while collecting data
I have an NFL simulator that runs and spits out a score for both teams based on a couple variables, however I would like the simulator to be more accurate. I am trying to get it to run 100 times, ...
0
votes
0answers
21 views
Can you use submenus with Tkinter's optionmenu widget? [on hold]
Is it possible to create sub menus within the optionmenu widget? If not is there another way to create a menu box with submenus apart from the main menu bar?
1
vote
1answer
25 views
Attribute error two classes
I am trying do two classes but I get an AttributeError: Application has no attribute "make_request" and it says that about make_requests and city_data too.
Here is my GUI:
from tkinter import *
from ...
0
votes
2answers
29 views
Display message when going over something with mouse cursor in Python
I have a gui made with TKinter in Python. I would like to be able to display a message when my mouse cursor goes, for example, on top of a label or button. The purpose of this is to explain to the ...
0
votes
0answers
19 views
Python Tkinter functionality out of the mainloop() specifically with ttk progressbars
I have a little example that someone has asked me for. The background is the following. There are many scripts written inhouse in my place of workand the question is:
how easy is it to attach a ...
0
votes
0answers
24 views
Bind event on combobox item hover
Here is example of simple ttk dialog to demonstrate my problem:
from Tkinter import *
import ttk
items = ["Item %d" % (i+1,) for i in range(9)]
d = dict(zip(items, [i + ' description.' for i in ...
0
votes
1answer
18 views
Python calculation/get function with menubutton
I am having problems when trying to set up a calculation for an NFL Simulator. User selects a team from a menu and each team has three variables: power rank, win percentage and luck. When making the ...
0
votes
1answer
22 views
Tracking listbox widget information
I am trying to create a GUI using tkinter for selecting text files with the end result being the file name along with the path for use with another program. The text files may not be in the same ...
1
vote
2answers
32 views
Labeling lines (Tkinter)
Beside the lines, I would like to show '1x', '2x', '3x', '4x' and '5x', respectively.
I could not upload the image due to insufficient reputation.
Thanks.
def draw_lines():
import Tkinter
...
0
votes
0answers
23 views
Relative size of Python Tkinter scale widget
I'm using the .place() method of assigning the location of slider bars on my application window. I am using relx, rely, and relwidth to control where the sliders go to make sure they scale up when I ...
1
vote
1answer
41 views
How well can IDLE be used without agreeing to ActiveState's ActiveTcl 8.6 license?
I am using IDLE for Python 3.2.5 on MAC OS 10.9, and when I open IDLE, it says
WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable. Visit http://www.python.org/download/mac/tcltk/ for ...
1
vote
1answer
28 views
How to Embed Cartopy in a Python Tkinter GUI?
I'd like to embed a Cartopy module map in a Python (2.7) Tkinter GUI app (on a Windows 7 PC), but I need help figuring out how.
As far as I understand, the Cartopy module simply enables matplotlib ...
0
votes
1answer
23 views
Tkinter/ImageTk 'AttributeError' when displaying a png image
I am trying to use a PNG image in a Tkinter Button widget with the help of ImageTk module from PIL library.
image = Image.open(os.path.join('icons','bulb.png')) # using PIL for png images
...
1
vote
2answers
19 views
Python ttk grid does not show all elements
I'm trying to make a simplified calendar widget in Tkinter/ttk to allow me to select month and year. I fail to get all of my elements to show. In the form given below, it only shows the combobox with ...
1
vote
1answer
16 views
Python / Tkinter - Label out of Vertical Alignment
could you help with the following problem?
Using Python's Tkinter I have coded a small app with a GUI.
Yet, one label of the GUI is moved upwards and not in vertical alignment
with the other element ...
0
votes
1answer
20 views
How do I get one attribute from a main GUI into a second GUI within the code?
from Tkinter import *
import random
root = Tk()
root.title="Space Game.py"
root.geometry=("1000x1000+500+300")
class Space(Frame):
def __init__(self, master):
**self.MetalResource = ...
0
votes
1answer
31 views
Tkinter gives error when ran the second time
I have written a GUI using Tkinter, which works fine the first time i run it. However, after quitting I try to run it again, and I get the following error:
Exception in Tkinter callback
Traceback ...
1
vote
1answer
36 views
No transparency in animated gif with Tkinter
I want to display an animated gif with Tkinter. I tried using the solutions proposed here.
The problem is that in my gif, only the first frame is complete. All other frame consist of a mostly ...
1
vote
1answer
17 views
Update label of tkinter menubar item?
Is it possible to change the label of an item in a menu with tkinter?
In the following example, I'd like to change it from "An example item" (in the "File" menu) to a different value.
from tkinter ...
1
vote
2answers
24 views
Tk window returns AttributeError: __len__
Here I'm starting to create a TK window with a text field but when ever I run this I get the error
Exception in Tkinter callback
Traceback (most recent call last):
File ...
1
vote
2answers
19 views
Tkinter classes are confusing me (basic )
I am new to python and programming in general and I have been trying to make a simple GUI program using Tkinter but it does not run and I don't understand the errors I get?
the Errors are: GUI ...
0
votes
1answer
31 views
“For” loops within a tkinter.messagebox?
Here is the offending code:
import itertools
perms = itertools.product('AEIOU', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', '-', '0123456789', '0123456789', '0123456789')
print('The possible combinations are:')
...
0
votes
1answer
39 views
Tkinter Window/Widget Proportional Resize
I'm currently working on a Python GUI version of Reversi for a programming class. I've already programmed the game logic, and I'm currently trying to implement the GUI using Tkinter. I'm having some ...
0
votes
1answer
19 views
Why does Matplotlib savefig images overlap?
I have built a GUI app in python which uses Tkinter.
This app produces and displays an image when a button is clicked.
The image is produced with matplotlib savefig("displayimage.png") in same ...
0
votes
3answers
27 views
assigning a global variable in Tkinter from a checkbutton widget
I've been working on a crude Tkinter population growth calculator type project, and it works fine with just the population consistently growing with no decay or lowered birth rate. I have been trying ...
1
vote
1answer
46 views
Adding a backspace button to a Python GUI Calculator
I'm making a GUI calculator in python using tkinter. The calculator works very and now i would like to add a backspace function so that it clears the last number on the display. For example 321 would ...
0
votes
2answers
47 views
Why is Entry.get() one key behind?
Consider the following code:
#!/usr/bin/env python3
from tkinter import *
from tkinter.ttk import *
root = Tk()
entry = Entry(root)
entry.bind('<Key>', lambda e: print(entry.get()))
...