#+BEGIN_COMMENT .. title: GTK-3 Calendars and menus .. slug: 08-calendars-and-menus .. date: 2014-03-08 12:00:00 UTC .. tags: GTK-3, python, widgets .. category: python .. description: Load a glade file displaying a menu bar and calendar widget. .. type: text #+END_COMMENT #+CAPTION: App chooser & scale widgets [[../../../images/gtk/tut08-menu-calendar.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 Calendars and menus' tags = 'GTK3', 'Python', 'menu', 'calendar' intro = '' date = '2014-03-08' path = os.path.abspath('./') image = web.template.path_image + '/gtk/tut08-menu-calendar.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( """Simple GTK application demonstrating the use of the date picker and application menus. The menu is hooked upto to show and hide the calendar and to set the text entry field to say hello world. Double clicking a day in the calendar widget will show the date in the text entry field. """) web.paragraph.append('') web.page.section(web.paragraph.render()) web.pre.create(load(os.path.abspath('./content/gtk3/tut08/tut08-menu-calendar.py'))) web.page.section(web.pre.render())