Being asked the same question in a Forum by DIFFERENT persons is one thing, but having the exact same question being asked 3 times by the same user, giving the exact same snippet as example in less than 2weeks...
Being asked the same question in a Forum by DIFFERENT persons is one thing, but having the exact same question being asked 3 times by the same user, giving the exact same snippet as example in less than 2weeks...
Without the rest of the code, and working with what you have given us, you have had 3 different answers that work. You just have to adapt one to your code OR provide a bit more of your code, maybe even share the project as zip, so that someone can try to see what's keeping it from working as expected.