Ejemplo n.º 1
0
    def __init__(self, parent):
        # Two stage creation (see http://wiki.wxpython.org/index.cgi/TwoStageCreation)
        pre = wx.PrePanel()
        self.PreCreate(pre)
        get_resources().LoadOnPanel(pre, parent, "mypanel")
        self.PostCreate(pre)

        # Define variables for the controls, bind event handlers

        self.Bind(wx.EVT_TEXT_ENTER,
                  self.OnText_enter_text1,
                  id=xrc.XRCID('text1'))
        self.Bind(wx.EVT_TEXT_ENTER,
                  self.OnText_enter_text2,
                  id=xrc.XRCID('text2'))
        self.Bind(wx.EVT_CHECKBOX, self.OnCheckbox_ch1, id=xrc.XRCID('ch1'))
        self.Bind(wx.EVT_SCROLL,
                  self.OnScroll_slider1,
                  id=xrc.XRCID('slider1'))
        self.Bind(wx.EVT_LISTBOX,
                  self.OnListbox_listbox1,
                  id=xrc.XRCID('listbox1'))
        self.Bind(wx.EVT_COMBOBOX,
                  self.OnCombobox_combo1,
                  id=xrc.XRCID('combo1'))
        self.Bind(wx.EVT_TEXT, self.OnText_combo1, id=xrc.XRCID('combo1'))
        self.Bind(wx.EVT_TEXT_ENTER,
                  self.OnText_enter_combo1,
                  id=xrc.XRCID('combo1'))
        self.Bind(wx.EVT_SPINCTRL, self.OnSpinctrl_sp1, id=xrc.XRCID('sp1'))
        self.Bind(wx.EVT_BUTTON, self.OnButton_button, id=xrc.XRCID('button'))
Ejemplo n.º 2
0
    def __init__(self, parent, id, editor):
        pre = wx.PrePanel()
        self.res = xrc.XmlResource(RESOURCE_FILE)
        self.res.LoadOnPanel(pre, parent, 'panelLibraryUI')
        self.PostCreate(pre)

        self.parent = parent
        self.editor = editor

        self.treeLibrary = xrc.XRCCTRL(self, "treeLibrary")
        self.thumbnail = xrc.XRCCTRL(self, "imgThumbnail")
        self.root = self.treeLibrary.AddRoot("Assets")
        self.lblInstanceCount = xrc.XRCCTRL(self, "lblInstanceCount")

        self.Bind(wx.EVT_TREE_BEGIN_DRAG, self.onBeginDrag)
        self.Bind(wx.EVT_TREE_ITEM_MENU, self.onRightClick)
        self.Bind(wx.EVT_TREE_BEGIN_LABEL_EDIT, self.onBeginEditName)
        self.Bind(wx.EVT_TREE_END_LABEL_EDIT, self.onEndEditName)
        self.Bind(wx.EVT_TREE_SEL_CHANGED, self.onSelectionChanged)

        self.meshes = self.treeLibrary.AppendItem(self.root, "Meshes")
        self.actors = self.treeLibrary.AppendItem(self.root, "Actors")
        self.animations = self.treeLibrary.AppendItem(self.root, "Animations")
        self.textures = self.treeLibrary.AppendItem(self.root, "Textures")
        self.shaders = self.treeLibrary.AppendItem(self.root, "Shaders")
        self.sounds = self.treeLibrary.AppendItem(self.root, "Sounds")
        self.terrains = self.treeLibrary.AppendItem(self.root, "Terrains")
Ejemplo n.º 3
0
    def __init__(self, parent, *args, **kw):
        """ Pass an initialized wx.xrc.XmlResource into res """
        f = os.path.join(os.path.dirname(__file__), self.xrc)
        res = XmlResourceWithHandlers(f)

        # Two stage creation (see http://wiki.wxpython.org/index.cgi/TwoStageCreation)
        pre = wx.PrePanel()
        res.LoadOnPanel(pre, parent, "orderList")
        self.PreCreate(pre)
        self.PostCreate(pre)

        # Define variables for the controls
        self.Choices = XRCCTRL(self, "Choices")
        self.Type = XRCCTRL(self, "Type")
        if hasattr(self, "OnType"):
            self.Type.Bind(wx.EVT_CHOICE, self.OnType)

        self.Number = XRCCTRL(self, "Number")
        self.Add = XRCCTRL(self, "Add")
        if hasattr(self, "OnAdd"):
            self.Bind(wx.EVT_BUTTON, self.OnAdd, self.Add)

        self.Delete = XRCCTRL(self, "Delete")
        if hasattr(self, "OnDelete"):
            self.Bind(wx.EVT_BUTTON, self.OnDelete, self.Delete)
Ejemplo n.º 4
0
    def __init__(self, parent, id):
        pre = wx.PrePanel()
        self.res = xrc.XmlResource(PANDA_OBJS_FILE)
        self.res.LoadOnPanel(pre, parent, 'panelPandaObjUI')
        self.PostCreate(pre)

        self.parent = parent

        self.treePandaObj = xrc.XRCCTRL(self, "treePandaObj")
        self.root = self.treePandaObj.AddRoot("Panda Objects")
        self.emptyNode = self.treePandaObj.AppendItem(self.root, "Empty Node")
        self.lights = self.treePandaObj.AppendItem(self.root, "Lights")
        self.ambient = self.treePandaObj.AppendItem(self.lights, "Ambient")
        self.directional = self.treePandaObj.AppendItem(
            self.lights, "Directional")
        self.point = self.treePandaObj.AppendItem(self.lights, "Point")
        self.spot = self.treePandaObj.AppendItem(self.lights, "Spot")
        self.cameras = self.treePandaObj.AppendItem(self.root, "Cameras")
        self.orthographic = self.treePandaObj.AppendItem(
            self.cameras, "Orthographic")
        self.perspective = self.treePandaObj.AppendItem(
            self.cameras, "Perspective")

        self.colliders = self.treePandaObj.AppendItem(self.root, "Colliders")
        self.sphere = self.treePandaObj.AppendItem(self.colliders,
                                                   "Collision Sphere")
        self.box = self.treePandaObj.AppendItem(self.colliders,
                                                "Collision Box")
        self.plane = self.treePandaObj.AppendItem(self.colliders,
                                                  "Collision Plane")

        self.rope = self.treePandaObj.AppendItem(self.root, "Rope")

        self.Bind(wx.EVT_TREE_BEGIN_DRAG, self.onBeginDrag)
Ejemplo n.º 5
0
    def __init__(self, parent, id=-1):

        pre = wx.PrePanel()

        res = xmlres.loadGuiResource('ViewSelectPanel.xrc')
        res.LoadOnPanel(pre, parent, "ID_VIEWSELECTPANEL")
        self.PostCreate(pre)

        self._view_select = xrc.XRCCTRL(self, "ID_VIEW_SELECT")

        self._find_text = xrc.XRCCTRL(self, "ID_REFRESH_FIND")
        self._clear_filter = xrc.XRCCTRL(self, "ID_CLEAR_FIND")
        self._filter_text = xrc.XRCCTRL(self, "ID_TEXT_FILTER")

        # temp var for delayed selection of view
        self._the_view = -1

        self._our_problem = False

        self._initViewSelect()

        self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._onViewSelected,
                  self._view_select)
        self.Bind(wx.EVT_TEXT, self._onFilterText, self._filter_text)
        self.Bind(wx.EVT_BUTTON, self._onRefreshFilter, self._find_text)
        self.Bind(wx.EVT_BUTTON, self._onClearFilter, self._clear_filter)
        self.Bind(wx.EVT_TEXT_ENTER, self._onRefreshFilter, self._filter_text)
        self.Bind(wx.EVT_UPDATE_UI, self._onUpdateUI)
        Publisher.subscribe(self._onViewChanged, signals.SET_VIEW)
Ejemplo n.º 6
0
    def __init__(self, parent, id, editor):
        pre = wx.PrePanel()
        self.res = xrc.XmlResource(STORY_OBJS_FILE)
        self.res.LoadOnPanel(pre, parent, 'panelStoryObjUI')
        self.PostCreate(pre)

        self.parent = parent
        self.editor = editor

        self.treeStoryObj = xrc.XRCCTRL(self, "treeStoryObj")
        self.root = self.treeStoryObj.AddRoot("Story Objects")
        self.scripts = self.treeStoryObj.AppendItem(self.root, "Scripts")
        self.conversations = self.treeStoryObj.AppendItem(
            self.root, "Conversations")

        self.thumbnail = xrc.XRCCTRL(self, "imgThumbnail")
        self.lblInstanceCount = xrc.XRCCTRL(self, "lblInstanceCount")
        #self.quests = self.treePandaObj.AppendItem(self.root, "Quests")

        #self.Bind(wx.EVT_TREE_BEGIN_DRAG, self.onBeginDrag)
        #self.Bind(wx.EVT_TREE_ITEM_MENU, self.onRightClick)
        #self.Bind(wx.EVT_TREE_BEGIN_LABEL_EDIT, self.onBeginEditName)
        #self.Bind(wx.EVT_TREE_END_LABEL_EDIT, self.onEndEditName)
        self.Bind(wx.EVT_TREE_SEL_CHANGED, self.onSelectionChanged)
        self.Bind(wx.EVT_TREE_ITEM_MENU, self.onRightClick)
Ejemplo n.º 7
0
    def __init__(self, parent, id=-1):

        pre = wx.PrePanel()

        res = xmlres.loadGuiResource('StatisticsPanel.xrc')
        res.LoadOnPanel(pre, parent, "ID_STATISTICSPANEL")
        self.PostCreate(pre)

        self._new_count = xrc.XRCCTRL(self, "ID_COUNT_NEW")
        self._upd_count = xrc.XRCCTRL(self, "ID_COUNT_UPDATED")
        self._new_text = xrc.XRCCTRL(self, "ID_NEW_TEXT")
        self._updated_text = xrc.XRCCTRL(self, "ID_UPDATED_TEXT")
        self._total_count = xrc.XRCCTRL(self, "ID_COUNT_TOTAL")
        self._clear_new = xrc.XRCCTRL(self, "ID_CLEAR_NEW")
        self._clear_updated = xrc.XRCCTRL(self, "ID_CLEAR_UPDATED")

        self._count_new = 0
        self._count_updated = 0
        self._first_count = True

        self._timer = wx.Timer(self)
        self._timer.Start(2000)
        self.Bind(wx.EVT_TIMER, self._onUpdateStats)
        self._syncStats()

        self.Bind(wx.EVT_BUTTON, self._onClearNew, self._clear_new)
        self.Bind(wx.EVT_BUTTON, self._onClearUpdated, self._clear_updated)
Ejemplo n.º 8
0
    def __init__(self, parent, *args, **kw):
        """ Pass an initialized wx.xrc.XmlResource into res """
        f = os.path.join(os.path.dirname(__file__), self.xrc)
        res = XmlResourceWithHandlers(f)

        # Two stage creation (see http://wiki.wxpython.org/index.cgi/TwoStageCreation)
        pre = wx.PrePanel()
        res.LoadOnPanel(pre, parent, "configConnect")
        self.PreCreate(pre)
        self.PostCreate(pre)

        # Define variables for the controls
        self.Servers = XRCCTRL(self, "Servers")
        self.ServerDetails = XRCCTRL(self, "ServerDetails")
        self.Username = XRCCTRL(self, "Username")
        self.GameShow = XRCCTRL(self, "GameShow")
        if hasattr(self, "OnGameShow"):
            self.Bind(wx.EVT_TOGGLEBUTTON, self.OnGameShow, self.GameShow)

        self.GameTitle = XRCCTRL(self, "GameTitle")
        self.Game = XRCCTRL(self, "Game")
        self.Password = XRCCTRL(self, "Password")
        self.AutoConnect = XRCCTRL(self, "AutoConnect")
        if hasattr(self, "OnAutoConnect"):
            self.Bind(wx.EVT_CHECKBOX, self.OnAutoConnect, self.AutoConnect)

        self.Debug = XRCCTRL(self, "Debug")
        if hasattr(self, "OnDebug"):
            self.Bind(wx.EVT_CHECKBOX, self.OnDebug, self.Debug)
Ejemplo n.º 9
0
    def __init__(self, parent, *args, **kw):
        """ Pass an initialized wx.xrc.XmlResource into res """
        f = os.path.join(os.path.dirname(__file__), self.xrc)
        res = XmlResourceWithHandlers(f)

        # Two stage creation (see http://wiki.wxpython.org/index.cgi/TwoStageCreation)
        pre = wx.PrePanel()
        res.LoadOnPanel(pre, parent, "panelSystem")
        self.PreCreate(pre)
        self.PostCreate(pre)

        # Define variables for the controls
        self.Tree = XRCCTRL(self, "Tree")
        self.PrevObject = XRCCTRL(self, "PrevObject")
        if hasattr(self, "OnPrevObject"):
            self.Bind(wx.EVT_BUTTON, self.OnPrevObject, self.PrevObject)

        self.NextObject = XRCCTRL(self, "NextObject")
        if hasattr(self, "OnNextObject"):
            self.Bind(wx.EVT_BUTTON, self.OnNextObject, self.NextObject)

        self.StepInto = XRCCTRL(self, "StepInto")
        if hasattr(self, "OnStepInto"):
            self.Bind(wx.EVT_BUTTON, self.OnStepInto, self.StepInto)

        self.Search = XRCCTRL(self, "Search")
Ejemplo n.º 10
0
    def __init__(self, parent, init=False):

        self.parent = parent
        self.initialized = False
        self.root = None

        self._resources = xrc.EmptyXmlResource()
        self._resources.Load(_getpath('xrc', 'configure.xrc'))

        pre = wx.PrePanel()
        self.PreCreate(pre)
        self._resources.LoadOnPanel(pre, parent, "configure_panel")
        self.PostCreate(pre)

        self.pg = wxpg.PropertyGridManager(self,
                                           style=wxpg.PG_SPLITTER_AUTO_CENTER
                                           | wxpg.PG_AUTO_SORT
                                           | wxpg.PG_TOOLBAR)

        self.pg_ctrl = self._resources.AttachUnknownControl(
            "property_grid", self.pg, self)
        xrc.XRCCTRL(self, 'generate_b').Bind(wx.EVT_BUTTON, self.onGenerate)
        xrc.XRCCTRL(self, 'reset_b').Bind(wx.EVT_BUTTON, self.onReset)
        xrc.XRCCTRL(self, 'load_b').Bind(wx.EVT_BUTTON, self.onLoad)
        xrc.XRCCTRL(self, 'save_b').Bind(wx.EVT_BUTTON, self.onSave)

        if init:
            wx.CallAfter(self.collect)
Ejemplo n.º 11
0
    def __init__(self, parent, id=wx.ID_ANY, style=wx.EXPAND):
        #load from XRC, need to use two-stage create
        pre = wx.PrePanel()
        res = gui.XrcUtilities.XmlResource('./gui/xrc/PropertyPanel.xrc')
        res.LoadOnPanel(pre, parent, "PropertyPanel")
        self.PostCreate(pre)

        ObjectPanel.Panel.Setup(self)
        self.OnCreate()
Ejemplo n.º 12
0
 def __init__(self, *args, **kw):
     if len(args) == 0:
         pre = wx.PrePanel()
         # the Create step is done by XRC.
         self.PostCreate(pre)
         self.Bind(wx.EVT_WINDOW_CREATE, self.OnCreate)
     else:
         wx.Panel.__init__(self, *args, **kw)
         self._PostInit()
Ejemplo n.º 13
0
 def __init__(self, *args, **kw):
     #        check if bitmaps list field was created
     if self.__dict__['bitmapsList'] is None:
         self.bitmapsList = []
     self.backgroundColor = wx.Colour(102, 102, 102)
     pre = wx.PrePanel()
     # the Create step is done by XRC.
     self.PostCreate(pre)
     self.Bind(wx.EVT_WINDOW_CREATE, self.OnCreate)
Ejemplo n.º 14
0
 def __init__(self, *args):
     if len(args) == 0:
         self.initReady = False
         pre = wx.PrePanel()
         # the Create step is done by XRC.
         self.PostCreate(pre)
         self.Bind(wx.EVT_WINDOW_CREATE, self.OnCreate)
     else:
         wx.Panel.__init__(self, args[0], args[1], args[2], args[3])
         self._PostInit()
Ejemplo n.º 15
0
    def __init__(self, parent):
        p = wx.PrePanel()
        self.PostCreate(p)

        res = wx.xrc.XmlResource.Get()
        res.LoadOnPanel(self, parent, "ExportSubMultipageText")

        self.ctrls = XrcControls(self)

        wx.EVT_CHOICE(self, GUI_ID.chFileVersion, self.OnFileVersionChoice)
Ejemplo n.º 16
0
 def __init__(self, dlg, notebook, resname=None):
   adm.ControlContainer.__init__(self, resname)
   self.dialog=dlg
   res=self.getResource()
   pre=wx.PrePanel()
   res.LoadOnPanel(pre, notebook, self.resname)
   self.PostCreate(pre)
   self.addControls(res)
   self.AddExtraControls(res)
   adm.logger.debug("Controls found in Panel %s/%s: %s", self.module, self.resname, ", ".join(self._ctls.keys()))
Ejemplo n.º 17
0
 def __init__(self, filterData = []):
     self.filterData = filterData
     self.filterState = {}
     self.filters = {}
     self.guiUtility = GUIUtility.getInstance()
     self.utility = self.guiUtility.utility
     self.state = None
     pre = wx.PrePanel()
     # the Create step is done by XRC.
     self.PostCreate(pre)
     self.Bind(wx.EVT_WINDOW_CREATE, self.OnCreate)
Ejemplo n.º 18
0
 def __init__(self, *args, **kw):
     self.selected = False
     self.colours = [wx.Colour(102,102,102), wx.WHITE]
     if len(args) == 0:
         pre = wx.PrePanel() 
         # the Create step is done by XRC. 
         self.PostCreate(pre) 
         self.Bind(wx.EVT_WINDOW_CREATE, self.OnCreate) 
     else:
         wx.Panel.__init__(self, *args, **kw) 
         self._PostInit()     
Ejemplo n.º 19
0
 def __init__(self, *args, **kw):
     if len(args) == 0:
         self.backgroundColor = wx.Colour(102, 102, 102)
         pre = wx.PrePanel()
         # the Create step is done by XRC.
         self.PostCreate(pre)
         self.Bind(wx.EVT_WINDOW_CREATE, self.OnCreate)
     else:
         self.backgroundColor = wx.Colour(102, 102, 102)
         wx.Panel.__init__(self, *args, **kw)
         self._PostInit()
Ejemplo n.º 20
0
    def __init__(self, parent):
        # Two stage creation (see http://wiki.wxpython.org/index.cgi/TwoStageCreation)
        pre = wx.PrePanel()
        self.PreCreate(pre)
        get_resources().LoadOnPanel(pre, parent, "PassageDetailsPanel")
        self.PostCreate(pre)

        # Define variables for the controls, bind event handlers
        self.passage_text = xrc.XRCCTRL(self, "passage_text")
        self.comment_text = xrc.XRCCTRL(self, "comment_text")
        self.passage_preview = xrc.XRCCTRL(self, "passage_preview")
Ejemplo n.º 21
0
    def __init__(self, parent):
        # Two stage creation (see http://wiki.wxpython.org/index.cgi/TwoStageCreation)
        pre = wx.PrePanel()
        self.PreCreate(pre)
        get_resources().LoadOnPanel(pre, parent, "SpLagVariable")
        self.PostCreate(pre)

        # create attributes for the named items in this container
        self.newVarNameCtrl = xrc.XRCCTRL(self, "newVarNameCtrl")
        self.warn = xrc.XRCCTRL(self, "warn")
        self.varsChoice = xrc.XRCCTRL(self, "varsChoice")
Ejemplo n.º 22
0
 def __init__(self, *args, **kw):
     self.triblerGrey = wx.Colour(128,128,128)   
     self.triblerLightGrey = wx.Colour(203,203,203)   
     if len(args) == 0:
         pre = wx.PrePanel()
         # the Create step is done by XRC.
         self.PostCreate(pre)
         self.Bind(wx.EVT_WINDOW_CREATE, self.OnCreate)
     else:
         wx.Panel.__init__(self, *args, **kw)
         self._PostInit()
Ejemplo n.º 23
0
 def __init__(self, *args, **kw):
     self.ready = False
     if len(args) == 0:
         self.backgroundColor = DEFAULT_BACKGROUND
         pre = wx.PrePanel()
         # the Create step is done by XRC.
         self.PostCreate(pre)
         self.Bind(wx.EVT_WINDOW_CREATE, self.OnCreate)
     else:
         self.backgroundColor = ((230, 230, 230))
         wx.Panel.__init__(self, *args, **kw)
         self._PostInit()
Ejemplo n.º 24
0
 def __init__(self, *args, **kw):
     self.backgroundColour = wx.WHITE
     self.percentage = 0.0
     self.eta = '?'
     self.enabled = True
     if len(args) == 0:
         pre = wx.PrePanel()
         # the Create step is done by XRC.
         self.PostCreate(pre)
         self.Bind(wx.EVT_WINDOW_CREATE, self.OnCreate)
     else:
         wx.Panel.__init__(self, *args, **kw)
         self._PostInit()
Ejemplo n.º 25
0
    def __init__(self, parent):
        # Two stage creation (see http://wiki.wxpython.org/index.cgi/TwoStageCreation)
        pre = wx.PrePanel()
        self.PreCreate(pre)
        get_resources().LoadOnPanel(pre, parent, "TemplatePanel")
        self.PostCreate(pre)

        # Define variables for the controls, bind event handlers
        self.header = xrc.XRCCTRL(self, "header")
        self.body = xrc.XRCCTRL(self, "body")
        self.footer = xrc.XRCCTRL(self, "footer")
        self.headings = xrc.XRCCTRL(self, "headings")
        self.instructions = xrc.XRCCTRL(self, "instructions")
Ejemplo n.º 26
0
    def __init__(self, parent):
        # Two stage creation (see http://wiki.wxpython.org/index.cgi/TwoStageCreation)
        pre = wx.PrePanel()
        self.PreCreate(pre)
        get_resources().LoadOnPanel(pre, parent, "OptionsPanel")
        self.PostCreate(pre)

        # Define variables for the controls, bind event handlers
        self.options_panel = xrc.XRCCTRL(self, "options_panel")
        self.gui_search_type = xrc.XRCCTRL(self, "gui_search_type")
        self.proximity = xrc.XRCCTRL(self, "proximity")
        self.proximity_type = xrc.XRCCTRL(self, "proximity_type")
        self.case_sensitive = xrc.XRCCTRL(self, "case_sensitive")
Ejemplo n.º 27
0
    def __init__(self, parent, *args, **kw):
        """ Pass an initialized wx.xrc.XmlResource into res """
        f = os.path.join(os.path.dirname(__file__), self.xrc)
        res = XmlResourceWithHandlers(f)

        # Two stage creation (see http://wiki.wxpython.org/index.cgi/TwoStageCreation)
        pre = wx.PrePanel()
        res.LoadOnPanel(pre, parent, "orderRange")
        self.PreCreate(pre)
        self.PostCreate(pre)

        # Define variables for the controls
        self.Value = XRCCTRL(self, "Value")
Ejemplo n.º 28
0
 def __init__(self, *args, **kw):
     #        print "<mluc> tribler_topButton in init"
     self.initDone = False
     self.enabled = True
     if len(args) == 0:
         self.backgroundColor = wx.Colour(102, 102, 102)
         pre = wx.PrePanel()
         # the Create step is done by XRC.
         self.PostCreate(pre)
         self.Bind(wx.EVT_WINDOW_CREATE, self.OnCreate)
     else:
         self.backgroundColor = wx.Colour(102, 102, 102)
         wx.Panel.__init__(self, *args, **kw)
         self._PostInit()
Ejemplo n.º 29
0
    def __init__(self, parent):
        # Two stage creation (see http://wiki.wxpython.org/index.cgi/TwoStageCreation)
        pre = wx.PrePanel()
        self.PreCreate(pre)
        get_resources().LoadOnPanel(pre, parent, "TopicDetailsPanel")
        self.PostCreate(pre)

        # Define variables for the controls, bind event handlers
        self.name_label = xrc.XRCCTRL(self, "name_label")
        self.name_text = xrc.XRCCTRL(self, "name_text")
        self.display_tag_checkbox = xrc.XRCCTRL(self, "display_tag_checkbox")
        self.order_passages_choice = xrc.XRCCTRL(self, "order_passages_choice")
        self.description_label = xrc.XRCCTRL(self, "description_label")
        self.description_text = xrc.XRCCTRL(self, "description_text")
Ejemplo n.º 30
0
 def __init__(self,
              parent,
              id=-1,
              pos=wx.Point(0, 0),
              size=wx.Size(625, 430),
              style=wx.TAB_TRAVERSAL,
              name='panel'):
     pre = wx.PrePanel()
     self.OnPreCreate()
     pre.Create(parent, id, pos, size, style, name)
     self.PostCreate(pre)
     self.initBefore()
     self.VwXinit()
     self.initAfter()