Hello All,
I wanted to know in a wxpython program how can i make button inactive for some part of program execution and then i can make it active later.
button.Disable()
button.Enable()
Also, in that button handler how can i call a new frame class which is in another module. For eg. i have main.py where i am haivng a button handler and i have temporary.py where i ahve a class called menu. How can i call this in main.py…
#make sure the module temporary.py is in the same directory as main.py
#have to import the module first
import temporary
def button_handler(self,event): #use dot notation to access the class in the module
menu = temporary.Menu()
#now you have a reference to your menu class from the other module
Hi,
Thanks for the suggestion. I had another question when i invoke menu in the main.py will the frame launch itself or do i need to call the showmodal method for the frame separately in the main program’s button handler.
Hello All,
I wanted to know in a wxpython program how can i make button inactive for some part of program execution and then i can make it active later.
button.Disable()
button.Enable()
Also, in that button handler how can i call a new frame class which is in another module. For eg. i have main.py where i am haivng a button handler and i have temporary.py where i ahve a class called menu. How can i call this in main.py…
#make sure the module temporary.py is in the same directory as main.py
#have to import the module first
import temporary
def button_handler(self,event): #use dot notation to access the class in the module
menu = temporary.Menu()
#now you have a reference to your menu class from the other module