Previous Thread  Next Thread

chat icon Loop and events

Greg63

Posted: Wed May 28, 2003 2:07 pm
Joined: 28 May 2003
Posts: 2
I'm new to python and I have a problem. I have created a program with a GUI which have a simple button 'start' and a button 'stop'. In the function start(), I have a loop which I want to stop by pressing on the button 'stop', but during the loop, I can't clik on this button...In the function stop(), I set a flag to true which is the condition to stop the loop. Is someone can help me ??
Reply with quote


theeth

Posted: Wed May 28, 2003 4:13 pm
Joined: 16 Oct 2002
Posts: 1177
when you code in a loop, Python doesn't do anything else, so it cannot check whether or not you're pressing a button.

Martin
_________________
Life is what happens to you when you're busy making other plans.
- John Lennon
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group