MyTetra Share
Делитесь знаниями!
Иерархия контроллов
Время создания: 09.06.2017 23:35
Раздел: Python - wx - Manual - Cody Precord - WxPython Application Development Cookbook - 1 Starting Points
Запись: xintrea/mytetra_db_mcold/master/base/1497040526trj1nut0be/text.html на raw.githubusercontent.com
# -*- coding: utf-8 -*-
# Chapter 1: wxPython starting points
# Recipe 5: Understanding the window hierarchy
#
import wx

class MyPanel(wx.Panel):
def __init__(self, parent):
super(MyPanel, self).__init__(parent)

self.button = wx.Button(self, label="Push Me")

class MyFrame(wx.Frame):
def __init__(self, parent, title=""):
super(MyFrame, self).__init__(parent, title=title)

self.panel = MyPanel(self)

class MyApp(wx.App):
def OnInit(self):
self.frame = MyFrame(None, title="Window Hierarchy")
self.frame.Show();
return True

if
__name__ == "__main__":
app = MyApp(
False)
app.MainLoop()
 
MyTetra Share v.0.59
Яндекс индекс цитирования