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


Groups > comp.lang.python > #40275 > unrolled thread

tracer une cercle dans python tkinter?

Started byolsr.kamal@gmail.com
First post2013-03-01 09:53 -0800
Last post2013-03-01 20:06 +0100
Articles 4 — 4 participants

Back to article view | Back to comp.lang.python


Contents

  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

#40275 — tracer une cercle dans python tkinter?

Fromolsr.kamal@gmail.com
Date2013-03-01 09:53 -0800
Subjecttracer une cercle dans python tkinter?
Message-ID<14fa231e-ca15-4eb4-a125-a756b0d62cdc@googlegroups.com>
comment tracer une cercle  contient un numéro au un symbole dans le center dans python tkinter?

[toc] | [next] | [standalone]


#40277

FromVincent Vande Vyvre <vincent.vandevyvre@swing.be>
Date2013-03-01 19:10 +0100
Message-ID<mailman.2742.1362161872.2939.python-list@python.org>
In reply to#40275
Le 01/03/13 18:53, olsr.kamal@gmail.com a écrit :
> comment tracer une cercle  contient un numéro au un symbole dans le center dans python tkinter?
Posez votre question ici:

http://www.developpez.net/forums/f96/autres-langages/python-zope/

-- 
Vincent V.V.
Oqapy <https://launchpad.net/oqapy> . Qarte
<https://launchpad.net/qarte> . PaQager <https://launchpad.net/paqager>

[toc] | [prev] | [next] | [standalone]


#40278

FromKarim <kliateni@gmail.com>
Date2013-03-01 19:22 +0100
Message-ID<mailman.2743.1362162133.2939.python-list@python.org>
In reply to#40275
On 01/03/2013 19:10, Vincent Vande Vyvre wrote:
> Le 01/03/13 18:53, olsr.kamal@gmail.com a écrit :
>> comment tracer une cercle  contient un numéro au un symbole dans le center dans python tkinter?
> Posez votre question ici:
>
> http://www.developpez.net/forums/f96/autres-langages/python-zope/
>
Heuu en anglais vous toucherez plus de monde.

K

[toc] | [prev] | [next] | [standalone]


#40281

FromPeter Otten <__peter__@web.de>
Date2013-03-01 20:06 +0100
Message-ID<mailman.2746.1362164781.2939.python-list@python.org>
In reply to#40275
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.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web