wxPython Probleme

Geiregat Jonas eniac at sdf-eu.org
Tue Jul 22 22:53:28 CEST 2003


Hey,
here's my piece of code :

class HtmlWindow(wxHtmlWindow):
   def __init__(self,parent,id):
       wxHtmlWindow.__init__(self,parent,id)


class channelTree(wxTreeCtrl):
   def __init__(self,parent,id):
       wxTreeCtrl.__init__(self,parent,id)
       self.root = self.AddRoot("Sites")
       for i in range(len(names)):
           self.AppendItem(self.root,names[i])
       EVT_TREE_SEL_CHANGED(self,105,self.OnCelChanged)

   def OnCelChanged(self,event):
       item = event.GetItem()
       print self.GetItemText(item)

class MainSplitter(wxSplitterWindow):
   def __init__(self,parent,id):
       wxSplitterWindow.__init__(self,parent,id)
       self.html = HtmlWindow(self,-1)
       self.html.LoadPage("welcome.html")
       self.SplitHorizontally(self.html,wxWindow(self,-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 ?











More information about the Python-list mailing list