I postes a question and was lucky to find the solution on my own later. So I posted it as a solution so that others can participate. This solution was deleted, I think because poster and solutioner were the same person. Then, for the first time, I discovered the "I've solved this myself!" button. So I cklicked it and posted the solution again and marked the question as solved.
Was this the right way? Because I do not see any tag at the solution that says something like "solved by the questioner".
"I've solved this myself" is indeed the button you use if that is the case. I suppose answering the question yourself might have confused members, but I don't believe answers to your own questions should be deleted.