我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用gi.repository.Gtk.VPaned()。
def __init__(self, core: ApartCore, sources: List[Dict[str, Any]], z_options: List[str]): Gtk.Box.__init__(self) self.core = core right_panes = Gtk.VPaned(expand=True) self.main_view = MainView(core, z_options) self.info_view = ClonePartInfo(sources, core, self.main_view) right_panes.pack1(self.info_view, shrink=False) right_panes.pack2(self.main_view, shrink=False) self.side_bar_box = Gtk.EventBox() self.side_bar_box.add(Gtk.StackSidebar(stack=self.info_view)) self.side_bar_box.connect('button-press-event', self.side_bar_click) self.paned = Gtk.Paned(expand=True) self.paned.pack1(self.side_bar_box, shrink=False) self.paned.pack2(right_panes, shrink=False) self.add(self.paned)