21 lines
875 B
Python
Executable File
21 lines
875 B
Python
Executable File
#+BEGIN_COMMENT
|
|
.. title: GTK-3 Example downloader using a listbox
|
|
.. slug: 13-example-list-box-downloader
|
|
.. date: 2014-05-01 12:00:00 UTC
|
|
.. tags: GTK-3, python, widgets, application
|
|
.. category: python
|
|
.. description: Populate a listbox with custom widgets, in this case an example file downloader could be the start of a plugin installer.
|
|
.. type: text
|
|
#+END_COMMENT
|
|
|
|
#+CAPTION: File downloader
|
|
[[../../../images/gtk/tut12-listbox.png]]
|
|
|
|
|
|
A slightly more complex example, loading our gui from a glade file and dynamically add and remove widgets based on an xml file.
|
|
|
|
This is the start of a simple file downloader, it reads an xml file and creates a gui dynamically with download buttons for each element in the xml data to retrieve files.
|
|
|
|
web.pre.create(load(os.path.abspath('./content/gtk3/tut13/tut13-listbox.py')))
|
|
web.page.section(web.pre.render())
|