Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/01/2009, 15:21
iozk
 
Fecha de Ingreso: mayo-2008
Mensajes: 499
Antigüedad: 16 años
Puntos: 1
sin close button

hola denuevo estoy haciendo una caja de herramientas pero le pongo MiniFrame y no me sale el boton de cerrar y le pongo (wx.Frame) le pongo estyle=wx.FRAME_TOOL_WINDOW: pero tampoco sale y ademas se pone en una esquina de mi pantalla y sin la barra de titulo (como si se ubiera atorado)

aqui el codigo para que cheken

Código python:
Ver original
  1. import wx
  2. class MiniFrame(wx.MiniFrame):
  3.     def __init__(self):
  4.         wx.MiniFrame.__init__(self, None, -1, 'Mini Frame', size=(300, 100))
  5.         panel = wx.Panel(self, -1, size=(300, 100))
  6.  
  7.         button = wx.Button(panel, -1, "Close Me", pos=(15, 15))
  8.         self.Bind(wx.EVT_BUTTON, self.OnCloseMe, button)
  9.         self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
  10.        
  11.     def OnCloseMe(self, event):
  12.         self.Close(True)
  13.     def OnCloseWindow(self, event):
  14.         self.Destroy()
  15.  
  16. if __name__ == '__main__':
  17.     app = wx.PySimpleApp()
  18.     MiniFrame().Show()
  19.     app.MainLoop()

Código python:
Ver original
  1. import wx
  2. class MiniFrame(wx.Frame):
  3.     def __init__(self):
  4.         wx.Frame.__init__(self, None, -1, 'Mini Frame', size=(300, 100), style=wx.FRAME_TOOL_WINDOW)
  5.         panel = wx.Panel(self, -1, size=(300, 100))
  6.  
  7.         button = wx.Button(panel, -1, "Close Me", pos=(15, 15))
  8.         self.Bind(wx.EVT_BUTTON, self.OnCloseMe, button)
  9.         self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
  10.        
  11.     def OnCloseMe(self, event):
  12.         self.Close(True)
  13.     def OnCloseWindow(self, event):
  14.         self.Destroy()
  15.  
  16. if __name__ == '__main__':
  17.     app = wx.PySimpleApp()
  18.     MiniFrame().Show()
  19.     app.MainLoop()