Tagged Questions
-2
votes
1answer
15 views
error when manipulate instance name of Tkinter widget
i dont know why get error when trying to manipulate an variable of tkinter widgets:
AttributeError: 'str' object has no attribute 'pack'
im trying to make a sieres of entry names so if my basic name ...
0
votes
1answer
12 views
Binding a function to a Tkinter text entry field
I am trying to make an address book using TKinter. I have entry fields for 'name, age, phone ect.' with text inside each one indicating what each one is. So in the name entry field, it says 'enter ...
0
votes
2answers
14 views
Add tkinter's intvar to an integer
I'm having some trouble adding a value taken from an Entry box and adding it to an existing number. In this case, I want the value of the "change speed" box to be added to the robots current speed. ...
0
votes
1answer
21 views
Tk open window issue/bug
If I type the following in the interpreter it works like a charm:
from Tkinter import Tk
from tkFileDialog import askopenfilename
Tk().withdraw()
fh = open(askopenfilename(), 'r')
However, if I ...
0
votes
2answers
29 views
python file dialog accessing file name
Im trying to use tkinter to open a file dialog, once this file dialogue is open how do i get the file object that is returned by the function. As in how do i access it in main?
basically how do i ...
0
votes
1answer
30 views
Why Do These Button Constructors Act Differently
In the following code, the two ways of constructing buttons act differently:
from Tkinter import *
def buildButton1():
root = Tk()
Button( root, command = lambda : foo(1) ).pack()
Button( ...
1
vote
2answers
22 views
Callback function tkinter button with variable parameter
from tkinter import *
F=Tk()
i=1
while i<10:
newButton = Button(F,text="Show Number",command=lambda:showNumber(i))
newButton.pack(side=TOP)
i+=1
def showNumber(nb):
print(nb)
...
2
votes
1answer
15 views
Hide python shell while using tkinter window
Is there any way to hide python shell while using a tkinter window or turtle window?
While opening py file by clicking the py shell shows every time but I don't need it.
0
votes
2answers
40 views
delete unselected items from listbox
I need to set a button that deletes un-selected things from a listbox.
I got this code:
def delete_unselected():
pos = 0
for i in llista:
if llista(pos) != llista.curselection():
...
0
votes
1answer
27 views
How to make tkinter dialog box appear first?
I'm very new to python.
I've coded as follows.
When user clicks the "Click button to setup CPE." button, the dialog window will appear and display the customer list.
My problem is that when the ...
0
votes
1answer
11 views
Generating Radiobutton grid menu from an Array in Tkinter, Python
Edit: Sorry I can't answer my own post since I'm new but I figured it out: If you remove the line "tki.Button(master,..." (2nd to last code line), then the code runs perfectly fine. I guess the grid ...
1
vote
1answer
18 views
How to alter attributes in Tkinter
Is there any way to alter options of a widget after creating/drawing it? I can't seem to find any way to do so. What I'm currently aiming for is altering the fg of a Label once its temp0 textvariable ...
1
vote
2answers
153 views
Key Event Handling using Tkinter in Python
check the following link out :
[PyObjC Key Event Handling Question] Key Events Handling using PyObjC in Mac OS X
This was my initial question. I somehow managed to find a built-in plugin to solve ...
0
votes
1answer
24 views
Python scrollbar on text widget
I'm trying to get a simple scrollbar to show up on the text widget...I've derived the following code which adds the scrollbar but seems to eliminate the text widget completely.
eula = ...
0
votes
1answer
31 views
Absolute positioning of Python tkinter elements
How can I make tkinter elements with absolute positioning so they don't push each other?