Hold wxframe (GUI)

Jaydeep Patil patil.jay2009 at gmail.com
Wed Mar 26 02:03:55 EDT 2014


On Wednesday, 26 March 2014 10:34:26 UTC+5:30, Jaydeep Patil  wrote:
> I constructed Two frames.
> 
> One frame consist of GUI which consist of one Ok button.
> 
> 
> 
> Afer click on OK button another GUI calls. But after Second gui calling, It wont stop further procesees. I need to stop futher proceeses. How can i hold second gui?
> 
> 
> 
> 
> 
> Please reply
> 
> 
> 
> 
> 
> 
> 
> Sample Code is:
> 
> 
> 
> import wx
> 
> class App(wx.App):
> 
>     '''
> 
>     classdocs
> 
>     '''
> 
>     def __init__(self,name=None):
> 
>         '''
> 
>         Constructor
> 
>         '''
> 
>         wx.App.__init__(self)
> 
>         self.d = Dashboard()
> 
>         self.d.Show()
> 
>         
> 
>     def _startMainLoop(self):
> 
>         self.MainLoop()
> 
>         pass
> 
>     
> 
>     def start(self):
> 
>         #self.d.Show()
> 
>         self._startMainLoop()
> 
>         pass
> 
> 
> 
> 
> 
> class Dashboard(wx.Frame):
> 
>     '''
> 
>     classdocs
> 
>     '''
> 
>     def __init__(self,name=None):
> 
>         '''
> 
>         Constructor
> 
>         '''
> 
>         wx.Frame.__init__(self,None,wx.ID_ANY)
> 
>         print("Frame 1")
> 
>         
> 
>         self.btnOk = wx.Button(self,-1,"OK")
> 
>         
> 
>         self.btnOk.Bind(wx.EVT_BUTTON,self.test)
> 
>     
> 
>     def test(self,event):
> 
>         print("Before")
> 
>         self.f = Dashboard1(self)  ##  I need to Stop here only
> 
>         self.f.Show()
> 
>         self.f.MakeModal(True)
> 
>         print("AFter")
> 
> 
> 
>         
> 
>         
> 
> class Dashboard1(wx.Frame):
> 
>     '''
> 
>     classdocs
> 
>     '''
> 
>     def __init__(self,parent):
> 
>         '''
> 
>         Constructor
> 
>         '''
> 
>         wx.Frame.__init__(self,parent,wx.ID_ANY)
> 
>         
> 
> a = App()
> 
> a.start()
> 
> 
> 
> 
> 
> Output is :
> 
> Frame 1
> 
> Before
> 
> After


Hi all, 

I need to hold the other execution part after next GUI calls?

How can do that?

Anybody can help me?


Regards
Jaydeep Patil



More information about the Python-list mailing list