#+BEGIN_COMMENT .. title: Displaying dialog boxes .. slug: 06-dialog-boxes .. date: 2014-02-03 12:00:00 UTC .. tags: GTK-3, python, widgets .. category: python .. description: Demonstration of opening various dialog boxes and retrieving the selected values. .. type: text #+END_COMMENT #+CAPTION: Progress bars and spinners [[../../../images/gtk/tut06-dialogs.png]] #append this to module path so we can load from the parent directory import sys, os from scaffold import web from scaffold.loaders import load, load_partial class page: name=__name__ title = 'GTK3 Dialog boxes' tags = 'GTK3', 'Python', 'dialog', 'colour', 'fonts', 'files' intro = '' date = '2014-02-03' path = os.path.abspath('./') image = web.template.path_image + '/gtk/tut06-dialogs.png' def create_content(self): web.images.create(self.image, title='GTK Window') web.page.section( web.div.create( web.images.render() ).set_classes('sources').render() ) web.paragraph.create( """This example program allows you to open the file selector dialogs and displays the selected files, it also demonstrates selecting colour and font from the built in selector dialogs.""") web.paragraph.append("once a file font or colour has been selected we grab the resulting value and display it as an example of retrieving the value.") web.page.section(web.paragraph.render()) web.pre.create(load(os.path.abspath('./content/gtk3/tut06/tut06-dialogs.py'))) web.page.section(web.pre.render())