Imitating the appearance of a user interface element is a legal gray area, but precedents tend to show that it's allowed — it's a very light shade of gray. The general issue is known as look and feel. There is no explicit legal protection for the appearance of a user interface. Copyright can cover specific visual elements (e.g. a picture or a font), not the appearance of a button. Patents don't cover aesthetic elements. Protection through the concept of trade dress has been attempted, but it would usually only apply if the imitator was trying to deceive the public into confusion with the original.
Code is covered by copyright, so copying someone else's code is not allowed unless the code comes under a license that explicitly allows it. That isn't an issue in the question you link to, since the asker is asking for help with his own code.
Copying functionality is perfectly legal. Functionality can only be covered by patents, and clicking buttons is not patented. Clean room design (copying the functionality while demonstrably not copying the code) is legal, there is converging jurisprudence on this issue.
In summary, there is no legal issue here. I'm not going to argue on whether it's ethical; the wording of your question clearly shows you think it isn't. But most of the informed world see nothing wrong with copying ideas, only with copying work. The question does not violate any “professional etiquette”.