Example #1
0
    def build(self):
        self.layout = BoxLayout(orientation='vertical')
        self.menuBar = MenuBar()
        self.menuBar.app = self
        self.layout.add_widget(self.menuBar)
        self.sublayout = BoxLayout(orientation='horizontal')
        self.layout.add_widget(self.sublayout)
        self.tv = CustomTreeView(root_options=dict(text='Tree One'), hide_root=True, indent_level=4)
        self.tv.size_hint = 1, None
        self.tv.bind(minimum_height = self.tv.setter('height'))
        self.tv.app = self
        populate_tree_view(self.tv)
        self.sv = ScrollView()
        self.sv.add_widget(self.tv)
        self.sublayout.add_widget(self.sv)
        # subsublayout = GridLayout()
        if self.detailsID != 0:
            self.details = Details.giveDetailsObject(self.detailsID)
            self.sublayout.add_widget(self.details)
        else:
            self.details = BoxLayout(orientation="vertical")
            self.sublayout.add_widget(self.details)
        # sublayout.add_widget(subsublayout)
        # sublayout.add_widget(Button(text='Test'))

        return  self.layout
Example #2
0
    def updateDetails(self, *args):
        children = self.sublayout.children[:1]

        self.sublayout.clear_widgets(children=children)
        self.details = Details.giveDetailsObject(self.detailsID)
        self.sublayout.add_widget(self.details)