I'm using Grayul.py as a design example for a notebook since it dynamically
adds and removes pages with very little code. Its a wonderful example of
what can be done without even using sizers! My pages will hold just about
anything but HTML. The original code is:
def OnAdd(self,event):
'Adds a new HTML window'
file = self.GetFileName()
if file:
newWin = wxHtmlWindow(self.note,-1)
self.note.AddPage(newWin,os.path.split(file)[1],1)
newWin.LoadPage(file)
How can I populate the page with the usual suspects - windows
and controls ? (what can be substituted for wxHtmlWindow)
Right now I have:
class ButtonFrame (wxFrame):
'Creates a frame with a single button in the center'
def __init__ (self):
wxFrame.__init__ (self, NULL, -1, 'wxPython', wxDefaultPosition, (200, 100))
button = wxButton (self, 111, 'Click Me!')
EVT_BUTTON (self, 111, self.onButton)
#end def __init__
#end class ButtonFrame
...
def OnAdd (self, event):
'Adds a new notebook page'
newWin = wxScrolledWindow (self.notebook, -1)
self.notebook.AddPage (newWin, 1)
myframe = ButtonFrame()
frame.Show(true)
#end def OnAdd
... which doesn't create new notebook pages at all!
Is there a .Show() or something else I need to do ?
I imagine that -many- people would like to know how to do this.
Thanks