Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #40281
| Path | csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'root': 0.04; 'canvas': 0.07; 'tkinter': 0.07; 'python': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'def': 0.10; 'subject:python': 0.11; 'fancy': 0.16; 'received:80.91.229.3': 0.16; 'received:dip.t-dialin.net': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-dialin.net': 0.16; 'tracer': 0.16; 'true:': 0.16; 'wrote:': 0.17; 'yield': 0.17; 'url:edu': 0.18; 'import': 0.21; 'header:User-Agent:1': 0.26; 'values': 0.26; 'header:X -Complaints-To:1': 0.28; 'safely': 0.33; 'to:addr:python-list': 0.33; 'text': 0.34; 'subject:?': 0.35; 'received:org': 0.36; 'subject:: ': 0.38; 'comment': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'remove': 0.61; 'more.': 0.62; 'email addr:gmail.com': 0.63; 'dans': 0.71; 'url:help': 0.72 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Peter Otten <__peter__@web.de> |
| Subject | Re: tracer une cercle dans python tkinter? |
| Date | Fri, 01 Mar 2013 20:06:29 +0100 |
| Organization | None |
| References | <14fa231e-ca15-4eb4-a125-a756b0d62cdc@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="UTF-8" |
| Content-Transfer-Encoding | 8Bit |
| X-Gmane-NNTP-Posting-Host | p5084bddd.dip.t-dialin.net |
| User-Agent | KNode/4.7.3 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2746.1362164781.2939.python-list@python.org> (permalink) |
| Lines | 43 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1362164781 news.xs4all.nl 6874 [2001:888:2000:d::a6]:52754 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:40281 |
Show key headers only | View raw
olsr.kamal@gmail.com wrote:
> comment tracer une cercle contient un numéro au un symbole dans le center
> dans python tkinter?
[I hope you can cope with English]
Use a Canvas widget:
import tkinter as tk
root = tk.Tk()
canvas = tk.Canvas(root, width=240, height=240)
canvas.pack()
canvas.create_oval((20, 20), (220, 220), width=10, fill="white")
tag = canvas.create_text(120, 120, text="42", justify=tk.CENTER,
font=("Helvetica", 110), fill="#800")
if 1: # fancy stuff; you can safely remove the complete if-statement
def n(x):
while True:
for i in reversed(range(x+1)):
yield i
values = n(42)
def down():
text = str(next(values))
canvas.itemconfig(tag, text=text)
root.after(300, down)
down()
root.mainloop()
See
http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/canvas.html
for more.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
tracer une cercle dans python tkinter? olsr.kamal@gmail.com - 2013-03-01 09:53 -0800 Re: tracer une cercle dans python tkinter? Vincent Vande Vyvre <vincent.vandevyvre@swing.be> - 2013-03-01 19:10 +0100 Re: tracer une cercle dans python tkinter? Karim <kliateni@gmail.com> - 2013-03-01 19:22 +0100 Re: tracer une cercle dans python tkinter? Peter Otten <__peter__@web.de> - 2013-03-01 20:06 +0100
csiph-web