Example #1
0
 def build(self):
     self.splitter = wal.Splitter(self.panel)
     self.panel.pack(self.splitter, expand=True, fill=True)
     self.tree_container = wal.VPanel(self.splitter)
     if not PREFS_DATA:
         PREFS_DATA.append(PrefsAppItem(PREFS_APP))
         # PREFS_DATA.append(PrefsDocItem(PREFS_DOC))
         for item in PREFS_DATA:
             item.init_prefs(self.app, self)
     self.tree = wal.TreeWidget(self.tree_container,
                                data=PREFS_DATA,
                                on_select=self.on_select,
                                border=False)
     self.tree_container.pack(self.tree, fill=True, expand=True)
     cont = wal.VPanel(self.splitter)
     cont.pack(wal.PLine(cont), fill=True)
     self.container = wal.VPanel(cont)
     cont.pack(self.container, fill=True, expand=True)
     cont.pack(wal.PLine(cont), fill=True)
     sash_pos = config.prefs_sash_pos
     self.splitter.split_vertically(self.tree_container, cont, sash_pos)
     self.splitter.set_min_size(sash_pos)
     if not wal.IS_MSW:
         self.tree.set_indent(5)
     self.tree.expand_all()
Example #2
0
	def build(self):
		self.splitter = wal.Splitter(self.panel)
		self.panel.pack(self.splitter, expand=True, fill=True)
		if not PREFS_DATA:
			PREFS_DATA.append(PrefsAppItem(PREFS_APP))
			PREFS_DATA.append(PrefsDocItem(PREFS_DOC))
			for item in PREFS_DATA:
				item.init_prefs(self.app, self)
		self.tree = wal.TreeWidget(self.splitter, data=PREFS_DATA,
								on_select=self.on_select)
		self.container = wal.HPanel(self.splitter)
		self.splitter.split_vertically(self.tree, self.container, 200)
		self.splitter.set_min_size(150)
		self.tree.set_indent(5)
		self.tree.expand_all()
Example #3
0
    def __init__(self, parent):
        wal.VPanel.__init__(self, parent)

        exp = wal.ExpandedPanel(self, 'Test options')
        self.pack(exp, fill=True)
        exp.pack(wal.Button(exp, 'Test button'))

        data = []
        root = wal.TreeElement('root')
        prov = wx.ArtProvider_GetBitmap
        icon = prov(wx.ART_CDROM, wx.ART_OTHER, wal.SIZE_16)
        root.icon = icon
        for item in range(5):
            el = wal.TreeElement('Element %d' % item)
            root.childs.append(el)
        data.append(root)
        data.append(root)

        self.tree = wal.TreeWidget(self, data, on_select=self.selected)
        self.pack(self.tree, expand=True, fill=True, padding=2)
        self.tree.expand_all()