(app_theme.get_pixbuf("web.png"), "网络浏览器", lambda: switch_tab(notebook_box, tab_2_box)), (app_theme.get_pixbuf("music.png"), "专辑封面", lambda: switch_tab(notebook_box, tab_4_box)), (app_theme.get_pixbuf("music.png"), "自定义控件", lambda: switch_tab(notebook_box, tab_5_box)), ]) notebook_frame = HorizontalFrame(20) notebook_frame.add(notebook) slider = HSlider() notebook_c = gtk.VBox() notebook_c.pack_start(notebook_frame, False, False) notebook_c.pack_start(notebook_box, True, True) #application.main_box.pack_start(notebook_frame, False, False) slider.to_page_now(notebook_c) application.main_box.pack_start(slider, True, True) notebook_box.add(tab_1_box) # Add body box. body_box = gtk.HBox() horizontal_frame = HorizontalFrame() horizontal_frame.add(body_box) tab_1_box.pack_start(horizontal_frame, True, True) scrolled_window = ScrolledWindow() items_length = 1000 items = map(
notebook = Notebook( [(app_theme.get_pixbuf("music.png"), "分类列表", lambda : switch_tab(notebook_box, tab_1_box)), (app_theme.get_pixbuf("web.png"), "网络浏览器", lambda : switch_tab(notebook_box, tab_2_box)), (app_theme.get_pixbuf("music.png"), "专辑封面", lambda : switch_tab(notebook_box, tab_4_box)), (app_theme.get_pixbuf("music.png"), "自定义控件", lambda : switch_tab(notebook_box, tab_5_box)), ]) notebook_frame = HorizontalFrame(20) notebook_frame.add(notebook) slider = HSlider() notebook_c = gtk.VBox() notebook_c.pack_start(notebook_frame, False, False) notebook_c.pack_start(notebook_box, True, True) #application.main_box.pack_start(notebook_frame, False, False) slider.to_page_now(notebook_c) application.main_box.pack_start(slider, True, True) notebook_box.add(tab_1_box) # Add body box. body_box = gtk.HBox() horizontal_frame = HorizontalFrame() horizontal_frame.add(body_box) tab_1_box.pack_start(horizontal_frame, True, True) scrolled_window = ScrolledWindow() items_length = 1000 items = map(lambda index: ListItem(