No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I have a problem with tree control and i don't know how to solve it, maybe someone can help me. What i'm trying to do is display widgets in a staticbox plus a help text when i select different items in a tree. For example when i select item1 in … |
|
Re:
Yeah, uhh I've heard about it, but where do i get it and how do i use it? HElp is appreciated |
|
I have the following sample code: [CODE]]import wx class TestFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, title="tree example", size=(600,30)) self.tree = wx.TreeCtrl(self) root = self.tree.AddRoot("Example") items = [ "test1", "test2", "test3",] self.AddTreeNodes(root, items) self.Bind(wx.EVT_TREE_ITEM_EXPANDED, self.OnItemExpanded, self.tree) self.Bind(wx.EVT_TREE_ITEM_COLLAPSED, self.OnItemCollapsed, self.tree) self.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnSelChanged, self.tree) self.Bind(wx.EVT_TREE_ITEM_ACTIVATED, self.OnActivated, self.tree) self.tree.Expand(root) def AddTreeNodes(self, parentItem, items): for item … |