def build(self):
     
     listing=[("0900","First show","The first show in the morning"),
              ("0930","Second show","Something else to watch"),
              ("1030","Movie 1","Best film of all time"),
              ("1300","News at lunch","Did you miss it this yesterday?")]
     
     outer_layout=kivy.uix.gridlayout.GridLayout(rows=4)
     outer_layout.create_property("shows")  
     outer_layout.shows={}
     [outer_layout.shows.update({show_id:{'name':entry[0],
             'start time':entry[1],
             'details':entry[2]}}) for show_id,entry in enumerate(listing)]
      
     outer_layout.create_property("show_details_label")
     outer_layout.show_details_label=kivy.uix.label.Label(
          text=generate_show_details_label(outer_layout.shows,0))
     outer_layout.add_widget(outer_layout.show_details_label)
     middle_layout=kivy.uix.gridlayout.GridLayout(cols=1,
         row_force_default=True, row_default_height=40)
     for index,list_entry in enumerate(listing):
         button=Button(text="%4s   %s"%(list_entry[0],list_entry[1]))
         button.bind(on_press=select_show_event)
         button.create_property("show_id")
         button.show_id=index
         middle_layout.add_widget(button)
         
     outer_layout.add_widget(middle_layout)
     return outer_layout
    def build(self):

        listing = [
            ("0900", "First show", "The first show in the morning"),
            ("0930", "Second show", "Something else to watch"),
            ("1030", "Movie 1", "Best film of all time"),
            ("1300", "News at lunch", "Did you miss it this yesterday?"),
            ("1400", "Movie 2", "A real tear-jerker"),
            ("1700", "Train reks", "For the kids"),
        ]

        outer_layout = kivy.uix.boxlayout.BoxLayout(orientation="vertical")
        selected_program_box = kivy.uix.gridlayout.GridLayout(rows=2)
        channel_box = kivy.uix.anchorlayout.AnchorLayout(anchor_x="left", anchor_y="top")
        channel_box.add_widget(kivy.uix.label.Label(text="BBC One"))
        selected_program_box.add_widget(channel_box)

        outer_layout.create_property("shows")
        outer_layout.shows = {}
        [
            outer_layout.shows.update({show_id: {"name": entry[1], "starttime": entry[0], "details": entry[2]}})
            for show_id, entry in enumerate(listing)
        ]

        outer_layout.create_property("show_details_label")
        outer_layout.show_details_label = kivy.uix.label.Label(
            text=generate_show_details_label(outer_layout.shows, 0), size_hint=(1.0, 0.2)
        )

        outer_layout.add_widget(outer_layout.show_details_label)

        middle_layout = kivy.uix.gridlayout.GridLayout(cols=1, row_force_default=True, row_default_height=40)
        for i, l in enumerate(listing):
            b = Button(text="%4s   %s" % (l[0], l[1]))
            b.bind(on_press=select_show_event)
            b.create_property("show_id")
            b.show_id = i
            middle_layout.add_widget(b)

        outer_layout.add_widget(middle_layout)
        return outer_layout