Creating a list similar to Firefox's download manager window

I am totally new to GUI development (mostly a CLI app developer) and wish to use wxPython for Win32 GUI applications.

I’ve had a quick look through the documentation but have been unable to find the correct function/technique to generate a list similar to Firefox’s download manager:

http://img82.imageshack.us/my.php?image=getright1ix2.png

Basically a list with each item having a seperate progress bar & buttons. All I’ve seen is table-like lists (both with wxPython and PHP-Gtk).

Can anyone advise and point me on how to build this with wxPython?

Jim Wall wrote:

I am totally new to GUI development (mostly a CLI app developer) and wish to use wxPython for Win32 GUI applications.

I've had a quick look through the documentation but have been unable to find the correct function/technique to generate a list similar to Firefox's download manager:

ImageShack - Best place for all of your image hosting and image sharing needs

Basically a list with each item having a seperate progress bar & buttons. All I've seen is table-like lists (both with wxPython and PHP-Gtk).

Can anyone advise and point me on how to build this with wxPython?

You could probably just put multiple wx.Gauges in your application. They look kind of old-school, but they're not bad. See the demo for that. Or you could look at Andrea Gavana's PyProgress and see if you could hack that for your program: http://xoomer.alice.it/infinity77/main/PyProgress.html

I'm pretty sure you could draw them too or create a custom control, but I'm not familiar enough with those advanced arts to really give any advice on them.

···

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org
Python Extension Building Network: http://www.pythonlibrary.org

If you don't want to use wxGauge or Andrea's gauge, you can reproduce
what you've shown.
I searched but couldn't find anything nor had heard of it, but as Mike said
you can create it custom. I whipped up something just to show that it could
look as similar as you'd like (see attached image--that is a screenshot of
a running wxFrame). You can build this by creating a custom panel class
that uses the following basic widgets: wxPanel, wxStaticText, wxImage.
You could then write the logic to resize the proportion of the blue panel to
the grey panel to create the gauge effect, and update the panels/text
accordingly. I'd make a custom panel that has this, and then for each
new download, you would just add one of these "Firefox download panels" to a
parent panel. Would you need more than that?

Che

···

On Sat, Nov 1, 2008 at 4:33 PM, Mike Driscoll <mike@pythonlibrary.org> wrote:

Jim Wall wrote:

I am totally new to GUI development (mostly a CLI app developer) and wish
to use wxPython for Win32 GUI applications.

I've had a quick look through the documentation but have been unable to
find the correct function/technique to generate a list similar to Firefox's
download manager:

ImageShack - Best place for all of your image hosting and image sharing needs

Basically a list with each item having a seperate progress bar & buttons.
All I've seen is table-like lists (both with wxPython and PHP-Gtk).

Can anyone advise and point me on how to build this with wxPython?

You could probably just put multiple wx.Gauges in your application. They
look kind of old-school, but they're not bad. See the demo for that. Or you
could look at Andrea Gavana's PyProgress and see if you could hack that for
your program: http://xoomer.alice.it/infinity77/main/PyProgress.html

I'm pretty sure you could draw them too or create a custom control, but I'm
not familiar enough with those advanced arts to really give any advice on
them.

That looks great Che. Would you mind sharing the source for that?
Ordered 'wxPython in Action' today from Amazon!

···

On Sun, Nov 2, 2008 at 10:16 PM, C M <cmpython@gmail.com> wrote:

If you don't want to use wxGauge or Andrea's gauge, you can reproduce
what you've shown.
I searched but couldn't find anything nor had heard of it, but as Mike said
you can create it custom. I whipped up something just to show that it could
look as similar as you'd like (see attached image--that is a screenshot of
a running wxFrame). You can build this by creating a custom panel class
that uses the following basic widgets: wxPanel, wxStaticText, wxImage.
You could then write the logic to resize the proportion of the blue panel to
the grey panel to create the gauge effect, and update the panels/text
accordingly. I'd make a custom panel that has this, and then for each
new download, you would just add one of these "Firefox download panels" to a
parent panel. Would you need more than that?

Jim Wall wrote:

That looks great Che. Would you mind sharing the source for that?
Ordered 'wxPython in Action' today from Amazon!
  
Good choice! I still use it a lot. There are a few examples that may have changed somewhat now from what I've seen on this list, but I don't recall what they are. Hopefully Robin has made note of these in the book errata on the main site.

Mike

···

On Sun, Nov 2, 2008 at 10:16 PM, C M <cmpython@gmail.com> wrote:
  

If you don't want to use wxGauge or Andrea's gauge, you can reproduce
what you've shown.
I searched but couldn't find anything nor had heard of it, but as Mike said
you can create it custom. I whipped up something just to show that it could
look as similar as you'd like (see attached image--that is a screenshot of
a running wxFrame). You can build this by creating a custom panel class
that uses the following basic widgets: wxPanel, wxStaticText, wxImage.
You could then write the logic to resize the proportion of the blue panel to
the grey panel to create the gauge effect, and update the panels/text
accordingly. I'd make a custom panel that has this, and then for each
new download, you would just add one of these "Firefox download panels" to a
parent panel. Would you need more than that?
    

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

That looks great Che. Would you mind sharing the source for that?

Sure. I added a bit more to show how the blue download bar can be updated.
In this case, it is just updating once a second to sort of simulate a download.
To try it, left click on one of the blue buttons to the right (it is
actually just one
image, I'm cheating here), and then try another one. It doesn't work as it
would on a real download, but just to see the bars moving is more convincing.

This is just a rough thing to give you an idea that it is not hard to
do this. My
code is partly generated with Boa Constructor, but I've edited it a
little for clarity.
The images needed are also attached. Make sure they are in the folder:
'C:/Documents and Settings/user/Desktop/picture.jpg'
where user = the right username. (Or edit that line to where the images
will go).

I've hard coded aspects of this, like the title bar's message, etc., so, again,
this is just to give you some ideas to get started.

Best,
Che

firefox_download_manager.py (5.04 KB)

buttons.jpg

picture.jpg

···

On Mon, Nov 3, 2008 at 12:48 PM, Jim Wall <jim3371@googlemail.com> wrote:

Ordered 'wxPython in Action' today from Amazon!

On Sun, Nov 2, 2008 at 10:16 PM, C M <cmpython@gmail.com> wrote:

If you don't want to use wxGauge or Andrea's gauge, you can reproduce
what you've shown.
I searched but couldn't find anything nor had heard of it, but as Mike said
you can create it custom. I whipped up something just to show that it could
look as similar as you'd like (see attached image--that is a screenshot of
a running wxFrame). You can build this by creating a custom panel class
that uses the following basic widgets: wxPanel, wxStaticText, wxImage.
You could then write the logic to resize the proportion of the blue panel to
the grey panel to create the gauge effect, and update the panels/text
accordingly. I'd make a custom panel that has this, and then for each
new download, you would just add one of these "Firefox download panels" to a
parent panel. Would you need more than that?

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users