Does anyone have a suggestion for adding a text field to a window's toolbar that'll resize with the window?
Before you say use an NSSearchField, I don't want the search and cancel buttons displayed and AFAIK, you can't hide those buttons in older versions of macOS which I still have to support. Also, I want the toolbar item to resize with the window. I've tried putting using an NSTextField as a custom view for an NSToolbarItem but for some reason, the text field appears a few pixels shorter and all text within it get cropped vertically. I filed a bug report during the Big Sur beta but got no response.
Before you say use an NSSearchField, I don't want the search and cancel buttons displayed and AFAIK, you can't hide those buttons in older versions of macOS which I still have to support. Also, I want the toolbar item to resize with the window. I've tried putting using an NSTextField as a custom view for an NSToolbarItem but for some reason, the text field appears a few pixels shorter and all text within it get cropped vertically. I filed a bug report during the Big Sur beta but got no response.