2020r2 Search Field

Does the new searchfield control expose the handle to the NSSearchfield so it can be used on the toolbar?

1 Like

It does, I’ve done this.

2 Likes

Sorry for hijacking this old post, but how can this be done? I’ve been trying to add a search field to my DesktopToolBar, but I don’t know how to achive this.

You need declares for that.

The declares for API 1.0 are part of my AppKit, but alas DesktopControls are not compatible.

Also you need to be aware that starting with Big Sur, you should be using the newer toolbar search item, which isn’t supported by Xojo, but again the declares for doing this with a API 1.0 app are part of the App Kit.

You could file feature requests for such functionality, but don’t expect it to get implemented.

Thanks for your reply! Unfortunately I’m not very experienced with declares – it was laborious enough to get the unified toolbar (and vibrancy in a part of my window) up and running.
My application does what it should do and is only for private use, so I’ll stick to a workaround for the missing toolbar search field, but still I think that Xojo apps out of the box start to look and behave rather outdated. I guess I have to live with that for the moment (though I’m beginning to wonder after quite a few years if a renewal of my subscription is really worth it …)

1 Like

hello Jens
Not all functions can be used sensibly in the window bar
see my test object

https://www.dropbox.com/s/45nbh98ne7iwkue/Titelzeile%20beschreiben%20%2B%20Toolbar%202.xojo_binary_project?dl=1

I don’t know if you’ve seen my thread from last year, where I tried to lobby Xojo to focus on the Mac. There’s several posts in that thread where I highlight a great deal of things where Xojo really needs to improve.

Rumors suggest that a couple of the items are coming, but some of the things I mentioned have had feature requests for over a decade.

Perhaps you could add a post to the thread requesting Searchfield in toolbar functionality?

I agree with you, the more Xojo falls behind, the less valuable it can feel.

@RudolfJ: I tried something similiar, but it didn’t match the “real thing”.

@Sam_Rowlands: Yes, I saw the thread and felt very much the same. On the other hand I am just a hobby programmer, and since I finished my library management app I use every day for work I mostly turned my back on programming on the whole. So I felt no urge to participate in the discussion. And as much as I like Xojo for my purposes, I never felt that discussions have an effect on what’s changing or not. And if a macOS update hadn’t broken my app a few months ago, I wouldn’t have renewed my licence this time.

Right now my app works and I placed the search field at the bottom (see picture), being not visible when not active. I would just like to have it in the toolbar at the top on the right side, but it will have to do as it is …

Thanks for your replies!

1 Like