Hi,
I have dragged an NSSearchField onto my window, but when the app is run, the search field automatically gets activated (as if the user has clicked inside it, even though they haven’t).
Does anyone know how to prevent this?
At the moment, I have to click on a listbox or other control first, in order to deselect the NSSearch Field - really annoying!!
I have tried setting the focus to another control in the Window.Open event - to no avail.
I can find no info on the NSSearchField in the LR, and also cannot find out how to change the default “Search” word that appears inside the control.
I thought the NSSearchField was part of the new Xojo - hence why I was looking in the Language Reference. It must be part of macoslib then, and has been automatically added to the Library.
Very strange. If I click on a Listbox or a text area - the NSSearchField deselects. If I try to set focus to another control via code / timer - it does NOT deselect.
The NSSearchField works as expected in the toolbar, but not when placed in a window?
No; that implementation is intended to work in a window. The new version of macoslib will have such controls with base implementation provided in a plugin, which should eliminate most hackery needed to get them to play well with the focus and such.
Bit confused now. I am using the latest version of macoslib - I downloaded it from GitHub about 2 days ago.
Someone else is having exactly the same problem as me, so this time it can’t actually be a problem with my code
I just tried the MacOSLib version with a textField in the same window. As long as the textfield is above the NSSearchField in the window’s taborder it seems to not steal focus. ListBox fails though.