I’m using the new desktop Search Field control and am trying to add a menu. The first problem is that it seems you don’t get the menu UI (downward triangle next to the magnifying glass) unless you allow Recent Items. OK, I can do that. But even then the ConstructContextualMenu event never fires. The question is, is it possible to add a menu (other than Recent Items) to a search field?
This is not currently possible, but there is a Feedback Case for it here: feedback://showreport?report_id=62872
Thanks, but that’s not the same thing. That feedback deals with manipulating the Recent Search menu items. I’m talking about adding specific menu items that are fixed, not related to what the user as searched for. For example, the contents of the field are used to search a database, and the menu I would like to add lets users select which field to search (e.g. name, address, etc.). I can do this with MacOSLib, but I’d prefer to transition to the Xojo control if possible.
The ConstructContextualMenu event will fire if it is activated while the mouse is on the magnifying glass icon and not in the editable area of the control. At least that’s what happens on Windows. I don’t know about the other platforms.
You may file a Feature request for that if you want.
As I said, it doesn’t fire for me (macOS).
Yes, thanks, I’ll file a feature request.