Am 14.01.14 22:27, schrieb Lewis Wood:
Also anyone know how to create an entry box for Tkinter where you can only
enter in 2 digits?
You must use a validator to achieve this. This is a more advanced topic
though. A validator is a function that is called whenever the user keys
something in - e
Also anyone know how to create an entry box for Tkinter where you can only
enter in 2 digits?
--
https://mail.python.org/mailman/listinfo/python-list
I cannot say how grateful I am to find such a community willing to help <3
Thanks to everyone posting, learned a lot of new stuff :) Never knew you could
just bring a local var into a def block using global inside of the function.
Again, thanks for taking your time to help out newbies to program
On Tue, Jan 14, 2014 at 5:49 AM, wrote:
> entry = entry1var.get()
> if entry == num1:
> elif entry > num1:
> elif entry < num1:
>
> num1 =str(random.randint(10,99))
> num2 =str(random.randint(10,99))
> num3 =str(random.randint(10,99))
> mastercode = num1+num2+num3
Be careful of c
On Monday, January 13, 2014 12:49:07 PM UTC-6, Lewis Wood wrote:
> labelent1 = Label(main, text="Correct!",fg="green").grid(row = 0, column = 3)
>
> [snip]
>
> UnboundLocalError: local variable 'labelent1' referenced before assignment
Observe the following interactive session and prepare to be e
fluttershy...@gmail.com wrote:
> Inside the function is where I am having the problem, I am trying to get
> it to delete the label so that it may then replace it with a shorter text.
> Here is the full code:
> def check1():
> entry = entry1var.get()
> if entry == num1:
> labelent1
When I try to use the labelent1.configure, it greets me with an error:
AttributeError: 'NoneType' object has no attribute 'configure'
I changed the labelent's to global. Don't suppose you know why?
Also how would I go about using an object for the entire window. I am still a
Novice at Tkinter and
Am 13.01.14 19:49, schrieb fluttershy...@gmail.com:
Inside the function is where I am having the problem, I am trying to get it to
delete the label so that it may then replace it with a shorter text.
Here is the full code:
from tkinter import *
import random
main = Tk()
main.title("Crack th
Forgot to mention I am using Python 3.3.3
--
https://mail.python.org/mailman/listinfo/python-list
Inside the function is where I am having the problem, I am trying to get it to
delete the label so that it may then replace it with a shorter text.
Here is the full code:
from tkinter import *
import random
main = Tk()
main.title("Crack the Code")
def check1():
entry = entry1var.get()
10 matches
Mail list logo