Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #51088
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.xlned.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <jason.swails@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.006 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'root': 0.05; 'tkinter': 0.07; '__name__': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'def': 0.12; "'__main__':": 0.16; '*args):': 0.16; '23,': 0.16; 'cc:name:python list': 0.16; 'tkinter.': 0.16; '\xa0def': 0.16; 'wrote:': 0.18; 'app': 0.19; 'help.': 0.21; '8bit%:5': 0.22; 'example': 0.22; 'import': 0.22; 'cc:addr:python.org': 0.22; 'skip:\xa0 20': 0.24; 'cc:2**0': 0.24; 'source': 0.25; 'this:': 0.26; 'skip:_ 20': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'class': 0.32; 'url:python': 0.33; 'skip:# 10': 0.33; 'skip:_ 10': 0.34; 'something': 0.35; 'received:google.com': 0.35; 'add': 0.35; 'appearance': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'jason': 0.38; 'url:library': 0.38; '8bit%:6': 0.40; 'how': 0.40; 'new': 0.61; 'simple': 0.61; 'dear': 0.65; 'jul': 0.74; 'demonstrates': 0.84; '2013': 0.98 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=CTVeia+MhDT7kIVpw47rILDfCbZnmFQWYol2Bhnccbk=; b=gNOc/6EHnCewD7khIP3N/2T+U5SsWk3wiflDcxNb6Qp922bjvz7yb6ftmECv621Hwj lwvyZfuVHUHRibxX1c8lSCRpZEw9o5LiOwtdsjSzHVOhdru+gE0Cx1wSSukp+nJaRle/ 4oCwOcYPqL8SdPuE2670932t+6BD9mUtP0IqHhmq2DvKQWWkNeMFdFuSUAZTd38XdNOU E2segNBT5dJHxHVzTJ5pbzrpf71li9bJSSzUHZccqmQ0PpCIhpQvpTVp6VqeU9sCDJ04 risH8Dy+5btEnbZlMCQao4p1Vr3QkFNOrVIo+F4QA8de6lYqPn8s7VpZ8PUGzSsnDukb OPVw== |
| MIME-Version | 1.0 |
| X-Received | by 10.50.47.46 with SMTP id a14mr11946672ign.46.1374586079184; Tue, 23 Jul 2013 06:27:59 -0700 (PDT) |
| In-Reply-To | <fe5a2cf6-2135-4d93-947a-bf9a51a3c15c@googlegroups.com> |
| References | <e1aae2d8-4e27-4644-8119-173fd8f5b47e@googlegroups.com> <kslfb0$pi0$1@dont-email.me> <fe5a2cf6-2135-4d93-947a-bf9a51a3c15c@googlegroups.com> |
| Date | Tue, 23 Jul 2013 09:27:59 -0400 |
| Subject | Re: tkinter progress bar |
| From | Jason Swails <jason.swails@gmail.com> |
| To | hsiwrek@walla.com |
| Content-Type | multipart/alternative; boundary=089e013c699cf6920a04e22dc27e |
| Cc | python list <python-list@python.org> |
| 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.5007.1374586082.3114.python-list@python.org> (permalink) |
| Lines | 120 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1374586082 news.xs4all.nl 15947 [2001:888:2000:d::a6]:37652 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:51088 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On Tue, Jul 23, 2013 at 5:38 AM, <hsiwrek@walla.com> wrote:
> Dear Christian,
>
> Thanks for the help. Can you please add a source example as I am new with
> Tkinter.
>
http://docs.python.org/2/library/ttk.html#progressbar
You can do something like this:
#!/usr/bin/env python
import Tkinter as tk
import ttk
import time
class MainApp(tk.Frame):
def __init__(self, master):
tk.Frame.__init__(self, master)
self.progress = ttk.Progressbar(self, maximum=10)
self.progress.pack(expand=1, fill=tk.BOTH)
self.progress.bind("<Button-1>", self._loop_progress)
def _loop_progress(self, *args):
for i in range(10):
self.progress.step(1)
# Necessary to update the progress bar appearance
self.update()
# Busy-wait
time.sleep(2)
if __name__ == '__main__':
root = tk.Tk()
app = MainApp(root)
app.pack(expand=1, fill=tk.BOTH)
root.mainloop()
This is a simple stand-alone app that (just) demonstrates how to use the
ttk.Progressbar widget.
HTH,
Jason
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
tkinter progress bar hsiwrek@walla.com - 2013-07-22 23:52 -0700
Re: tkinter progress bar Christian Gollwitzer <auriocus@gmx.de> - 2013-07-23 10:43 +0200
Re: tkinter progress bar hsiwrek@walla.com - 2013-07-23 02:38 -0700
Re: tkinter progress bar Jason Swails <jason.swails@gmail.com> - 2013-07-23 09:27 -0400
csiph-web