Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #63947

Re: Tkinter GUI Error

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Christian Gollwitzer <auriocus@gmx.de>
Newsgroups comp.lang.python
Subject Re: Tkinter GUI Error
Date Tue, 14 Jan 2014 22:33:23 +0100
Organization A noiseless patient Spider
Lines 16
Message-ID <lb4afa$4dp$1@dont-email.me> (permalink)
References <1ab2aa93-1ba6-48b0-a5f4-5fb05cb523d1@googlegroups.com> <mailman.5435.1389669132.18130.python-list@python.org> <3f7e442e-b86d-45c9-bd70-52c6abcca549@googlegroups.com> <95e61d6c-5626-4d29-9dda-98e1bcb38546@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Tue, 14 Jan 2014 21:33:32 +0000 (UTC)
Injection-Info mx05.eternal-september.org; posting-host="cf24b1b95dd2a112e7d46d2fb5d5f72b"; logging-data="4537"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/HBX6wVuhzaVRNqknQMxt7qyqIE89mSWI="
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
In-Reply-To <95e61d6c-5626-4d29-9dda-98e1bcb38546@googlegroups.com>
Cancel-Lock sha1:19ZX0BA0+LPCIx2YcTYFCp19Nzw=
Xref csiph.com comp.lang.python:63947

Show key headers only | View raw


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 - even by copy/pasting - and has to decide, whether this 
change is accepted or not. It is relatively easy to annoy your users if 
the validator is not written carefully. For instance, you must always 
accept th eempty string, otherwise the users won't be able to delete 
everything - very annoying behaviour.

See for example this SO question

http://stackoverflow.com/questions/4140437/python-tkinter-interactively-validating-entry-widget-content

	Christian

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Tkinter GUI Error fluttershy363@gmail.com - 2014-01-13 10:49 -0800
  Re: Tkinter GUI Error Lewis Wood <fluttershy363@gmail.com> - 2014-01-13 10:51 -0800
  Re: Tkinter GUI Error Christian Gollwitzer <auriocus@gmx.de> - 2014-01-13 20:03 +0100
    Re: Tkinter GUI Error Lewis Wood <fluttershy363@gmail.com> - 2014-01-13 11:21 -0800
  Re: Tkinter GUI Error Peter Otten <__peter__@web.de> - 2014-01-13 20:36 +0100
  Re: Tkinter GUI Error Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-01-13 20:39 -0500
  Re: Tkinter GUI Error Rick Johnson <rantingrickjohnson@gmail.com> - 2014-01-13 18:47 -0800
  Re: Tkinter GUI Error Chris Angelico <rosuav@gmail.com> - 2014-01-14 14:12 +1100
    Re: Tkinter GUI Error Lewis Wood <fluttershy363@gmail.com> - 2014-01-14 11:11 -0800
      Re: Tkinter GUI Error Lewis Wood <fluttershy363@gmail.com> - 2014-01-14 13:27 -0800
        Re: Tkinter GUI Error Christian Gollwitzer <auriocus@gmx.de> - 2014-01-14 22:33 +0100

csiph-web