Hold wxframe (GUI)

J

Jaydeep Patil

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
 
J

Jaydeep Patil

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
 
M

Mark Lawrence

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,913
Messages
2,570,027
Members
46,419
Latest member
businessfunding

Latest Threads

Top