]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/ide/activegrid/tool/TabbedView.py
   1 #---------------------------------------------------------------------------- 
   9 # Copyright:    (c) 2004-2005 ActiveGrid, Inc. 
  10 # License:      wxWindows License 
  11 #---------------------------------------------------------------------------- 
  16 class TabbedView(dict, wx
.lib
.docview
.View
): 
  18     #---------------------------------------------------------------------------- 
  20     #---------------------------------------------------------------------------- 
  23         wx
.lib
.docview
.View
.__init
__(self
) 
  25         self
._currentView 
= None 
  28     def OnCreate(self
, doc
, flags
): 
  29         frame 
= wx
.GetApp().CreateDocumentFrame(self
, doc
, flags
) 
  31         self
._notebook 
= wx
.Notebook(frame
, -1, style 
= wx
.NB_BOTTOM
) 
  36     def AddView(self
, viewName
, view
): 
  37         self
._notebook
.AddPage(wx
.Panel(self
._notebook
, -1), viewName
) 
  38         self
._currentView 
= view
 
  39         self
._views
[viewName
] = view
 
  42     def __getattr__(self
, attrname
): 
  43         return getattr(self
._currentView
, attrname
) 
  46     def SetView(self
, viewName
): 
  47         self
._currentview 
= self
._views
[viewName
]