Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/07/2009, 15:29
iozk
 
Fecha de Ingreso: mayo-2008
Mensajes: 499
Antigüedad: 16 años, 10 meses
Puntos: 1
cambiar el contenido de un wx.window

hola necesito usar un toolbook para cambiar de ventanas como un notebook pero no quiero usar uno porque usa mucho espacio y no se como usar el toolbook asi que quiero hacer uno y vien asi va pero no encuantro como cambiar de ventanas
Código python:
Ver original
  1. import wx
  2.  
  3. class frame(wx.Frame):
  4.     def __init__(self, parent, id, title):
  5.         wx.Frame.__init__(self, parent, id, title)
  6.  
  7.         menubar = wx.MenuBar()
  8.         me_a = wx.Menu()
  9.         me_a.Append(10, "Salir", "Item_menu")
  10.         menubar.Append(me_a, "&Archivo")
  11.         self.SetMenuBar(menubar)
  12.         self.CreateStatusBar()
  13.  
  14.         tool = wx.ToolBar(self, -1)
  15.        
  16.         tool.AddLabelTool(10, "", wx.Bitmap("iconos/view_text.ico"))
  17.         tool.AddLabelTool(20, "code", wx.Bitmap("iconos/view_sidetree.ico"))
  18.         tool.AddLabelTool(30, "", wx.Bitmap("iconos/view_remove.ico"))
  19.         tool.Realize()
  20.        
  21.         self.pnl = wx.Window(self, -1)
  22.        
  23.         box = wx.BoxSizer(wx.VERTICAL)
  24.         box.Add(tool, 0, wx.EXPAND)
  25.         box.Add(self.pnl, 1, wx.EXPAND)
  26.         self.SetSizer(box)
  27.  
  28.         self.Bind(wx.EVT_TOOL, self.OnSurce, id=10)
  29.         self.Bind(wx.EVT_TOOL, self.OnDesign, id=20)
  30.        
  31.  
  32.    
  33.     def OnSurce(self, event):
  34.         self.pan = wx.Panel(self.pnl, -1, style= wx.TextCtrl(self.pnl, style=wx.TE_MULTILINE))
  35.        
  36.    
  37.     def OnDesign(self, event):
  38.         self.pl = wx.Panel(self.pnl, -1)
  39.  
  40.  
  41. app = wx.App()
  42. frame(None, -1, "Toolbar").Show()
  43. app.MainLoop()

espero que me puedan ayudar