Hey,
here's my piece of code :
class HtmlWindow(wxHt mlWindow):
def __init__(self,p arent,id):
wxHtmlWindow.__ init__(self,par ent,id)
class channelTree(wxT reeCtrl):
def __init__(self,p arent,id):
wxTreeCtrl.__in it__(self,paren t,id)
self.root = self.AddRoot("S ites")
for i in range(len(names )):
self.AppendItem (self.root,name s[i])
EVT_TREE_SEL_CH ANGED(self,105, self.OnCelChang ed)
def OnCelChanged(se lf,event):
item = event.GetItem()
print self.GetItemTex t(item)
class MainSplitter(wx SplitterWindow) :
def __init__(self,p arent,id):
wxSplitterWindo w.__init__(self ,parent,id)
self.html = HtmlWindow(self ,-1)
self.html.LoadP age("welcome.ht ml")
self.SplitHoriz ontally(self.ht ml,wxWindow(sel f,-1),500)
self.Show(1)
If you look at the channelTree class I've created a wxTreeCtrl when you
change a sel a execute onCelChanged Now I would like that when you
change a sel he loads an other page into the HtmlWindow. But I don't
really have an idea on how to do this any help ?
here's my piece of code :
class HtmlWindow(wxHt mlWindow):
def __init__(self,p arent,id):
wxHtmlWindow.__ init__(self,par ent,id)
class channelTree(wxT reeCtrl):
def __init__(self,p arent,id):
wxTreeCtrl.__in it__(self,paren t,id)
self.root = self.AddRoot("S ites")
for i in range(len(names )):
self.AppendItem (self.root,name s[i])
EVT_TREE_SEL_CH ANGED(self,105, self.OnCelChang ed)
def OnCelChanged(se lf,event):
item = event.GetItem()
print self.GetItemTex t(item)
class MainSplitter(wx SplitterWindow) :
def __init__(self,p arent,id):
wxSplitterWindo w.__init__(self ,parent,id)
self.html = HtmlWindow(self ,-1)
self.html.LoadP age("welcome.ht ml")
self.SplitHoriz ontally(self.ht ml,wxWindow(sel f,-1),500)
self.Show(1)
If you look at the channelTree class I've created a wxTreeCtrl when you
change a sel a execute onCelChanged Now I would like that when you
change a sel he loads an other page into the HtmlWindow. But I don't
really have an idea on how to do this any help ?