def OnInit(self): self.main = Frame1.create(None, self) try: self.conn = win32com.client.Dispatch("ADODB.Connection") lPath = os.getcwd().split("\\") self.db = str("\\".join(lPath)+"\\Cep.mdb") self.DSN="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + self.db self.conn.Open(self.DSN) self.cmd = win32com.client.Dispatch("ADODB.Command") self.cmd.ActiveConnection = self.conn self.rs = win32com.client.Dispatch("ADODB.Recordset") self.oParser = Parser() self.main.button1.Bind(wx.EVT_BUTTON, self.OnBuscar) self.main.button2.Bind(wx.EVT_BUTTON, self.OnBuscarEnd) self.main.statusBar = wx.StatusBar(self.main, -1) self.main.statusBar.SetFieldsCount(1) self.main.SetStatusBar(self.main.statusBar) self.main.statusBar.SetStatusText("Digite o CEP a ser consultado") self.main.Show() self.SetTopWindow(self.main) return True except Exception, e: print("Erro ao conectar com banco de dados! - "+str(e.args)) sys.exit(2)
def OnInit(self): self.main = Frame1.create(None) self.main.Show() self.SetTopWindow(self.main) self.main = gizmos.TreeListCtrl() self.main() return True
def OnInit(self): self.main = Frame1.create(None) print('create') # self.main = wx.Frame(parent = None) self.main.Show() self.SetTopWindow(self.main) return True
def OnInit(self): wx.InitAllImageHandlers() self.main = Frame1.create(None) self.main.Show() self.SetTopWindow(self.main) return True
def OnInit(self): self.main = Frame1.create(None) self.main.Show() self.SetTopWindow(self.main) return True
def OnBotonRegresarButton(self, event): ventanaInicial = Frame1.create(None) self.Destroy() ventanaInicial.Show()