文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Frames and Dialogs → MiniFrame

Frames and Dialogs → MiniFrame

时间:2007-04-12  来源:wxPhoenix

Overview = """\
A MiniFrame is a Frame with a small title bar. It is suitable for floating
toolbars that must not take up too much screen area. In other respects, it's the
same as a wx.Frame.
"""
 
import wx
  class Frame(wx.MiniFrame):
 def __init__(
  self, parent, id=-1, title='Test MiniFrame', pos=wx.DefaultPosition,  
  size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE
  ):
  
  wx.MiniFrame.__init__(self, parent, id, title, pos, size, style)
  panel = wx.Panel(self, -1)
  
  button = wx.Button(panel, -1, "Close Me")
  button.SetPosition((15, 15))
  self.Bind(wx.EVT_BUTTON, self.OnCloseMe, button)
  
 def OnCloseMe(self, event):
  self.Close(True)
 
  def TestFrame():
 app = wx.PySimpleApp()
 frame = Frame(parent=None, id=-1, title="Test Frame")
 frame.Centre()
 frame.Show()
 app.MainLoop()
 
if __name__ =="__main__":
 TestFrame()
相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载