Text Field with icon


I am trying to create a Searchfield with an Icon (like on this forum). The Icon must show persistent in the field and the first entry position must leave space for the icon. Placing an Icon/canvas in a textfield is no problem but it disappears as soon as the field receives focus…

Use MacOsLib https://github.com/macoslib You are looking for the NSSearchField class. If you download it and get it on your system, I have used it and can give you some more help if you need it.

Hi, sorry Windows…

You could put an icon(button) in front of the search field.
Turn the border off on both the icon and the search field.
Then put a nice rectangle around the icon and the search field.
Voila, you have a search with an icon in front of it.
Just my 2 cents.

Certainly worth a penny!