Your description is very confusing, an example would clarify your point!
What is inside what? What triggers the event?
Is the while loop really inside the event case??? If the while loop finishes AND there is nothing else left to do inside the same event case, the case WILL finish.
The stop button will only work if the case containing the while loop actually executes. Does it?