1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| class Fenetre(wxFrame):
def __init__(self,titre,text):
wxFrame.__init__(self,None,-1,titre,(0,0),(500,500), style=wxFRAME_NO_WINDOW_MENU|wxDEFAULT_FRAME_STYLE|wxMAXIMIZE)
self.msg=text
def Open(self):
dlg = wxFileDialog(self, "Choisissez un emplacement", "", "", "*.iri", wxOPEN|wxCHANGE_DIR)
if dlg.ShowModal()==wxID_OK:
self.msg=dlg.GetPath()
dlg.Destroy()
self.destroy()
class ApplicationOpen(wx.App):
def OnInit(self):
fenetre = Fenetre("Open")
fenetre.Show(True)
self.SetTopWindow(fenetre)
fenetre.Open()
return 1
Et dans la classe lançant l'application ApplicationOpen :
def openFile(self):
app = ApplicationOpen()
while app.res == "init":
pass
self.rendu=app.res
app.MainLoop() |
Partager