Draw FocusRing

Hi All. How do I draw a focusring around an object. For instance I have a textfield placed on a rounded rectangle. I want the rounded rectangle to show the focus ring not the text area when the text area has focus.

Alternatively is there an easier way to make a text area into a search field with the little magnifying glass like at the top right of finder and the top of the sourcelist in Xojo.