2
votes
3answers
15 views
How to prevent two root windows from coming up when I start Tkinter?
Question
How can I hide the two Tkinter root windows that are popping up in my program? I have tried to use root.widthdraw(). Here is a link to my Pastebin.
Background
I am trying to create a ...
0
votes
2answers
24 views
Tkinter GUI toplevel
from tkinter import*
import tkinter as tk
def topLevel():
top=Toplevel()
top.title("Listbox test")
notiLabel = Label(text ="----test----", font=('Times', 20))
notiLabel.pack()
...
1
vote
0answers
11 views
tkinter: Is it possible to attach GUIs from different tkinter programs together and easily navigate across them?
I'd like to build a number of tkinter GUI apps and then stack them together either horizontally or vertically. I'd also like to navigate across the app easily once they become attached so that at any ...
0
votes
1answer
27 views
error 'tuple' object has no attribute 'curselection'
So here is part of my code,
def infoButton():
conn = sqlite3.connect("sqlite.db")
book = conn.cursor()
listBox=(a,b,c,d,e,f,g)
index = listBox.curselection()[0]
event = ...
-1
votes
1answer
27 views
Tkinker module for Python 2.7
I have Python 2.7 and windows vista.
When I run following code:
`from Tkinker import *`
It will give this error:
Error:
Traceback (most recent call last):
File "C:/Python27/Button", line 5, in ...
0
votes
2answers
30 views
Python tkinter button callback unexpected behaviour
I have made a simple "program launcher" in Python. I have a tab delimited text file, with, at the moment, just:
notepad c:\windows\notepad.exe
write c:\windows\write.exe
...
3
votes
3answers
68 views
python if statement always [duplicate]
So, I'm building up a simple game in Python to get more acquainted with the language, and couldn't find a way of searching if this was asked before. :P Any-way, when this code block executes, I ...
0
votes
2answers
31 views
Python tkinter: Clicks in transparent shapes don't register
Fairly simple one, this. For example:
a = canvas.create_circle(0,0,50,50,outline='red',width=3,fill='')
b = canvas.create_circle(0,0,50,50,outline='red',width=3,fill='red')
b will respond to click ...
0
votes
1answer
53 views
Python logic assitance branching from main algorithm [closed]
I am having some issues with some Python code, which is down to my logic. I have a main function which is called via a button click within the UI, within this function depended on the result of the ...
2
votes
0answers
33 views
New thread life-cycle within Tkinter object
I've got an issue with working with the threading class within a Tkinter GUI. On initiating the Tkinter GUI, I create new Threading & Queue objects with a daemon and start it. In the Tkinter GUI, ...
1
vote
2answers
39 views
Difference between import tkinter as tk and from tkinter import
I know it is a stupid question but I am just starting to learn python and i don't have good knowledge of python. My question is what is the difference between
from Tkinter import *
and
import ...
0
votes
1answer
29 views
Referring to a python variable in SQLite3 DELETE statement
I am writing a function to delete a record from a table. The variable I am trying to refer to in the delete statement is a Tkinter entry field.
I get the variable using the .get() method, but I can't ...
0
votes
1answer
23 views
Python - reading 2D codes, improper output in Tkinter
I'm using libdmtx to read 2D codes from png files with this code:
#!/usr/bin/python
import os
import Tkinter
from Tkinter import *
from tkFileDialog import askopenfilename
top = Tkinter.Tk()
...
1
vote
1answer
9 views
showing a window that was hidden using `root.withdraw()` in tkinter
goal
to hide a window and slip into a callback process of taking entrieds from a user. Once done, show the window back again.
code
from Tkinter import *
def callback():
global root
...
0
votes
1answer
23 views
Collision Detection Not Reporting Correctly
I posted before about this project I'm working on (and your answers helped!) but I'm still a little fuzzy on why my collision detection isn't quite reporting correctly. It is returning true for every ...