This library creates a NSSearchField on OSX and a gadget that simulates its behaviour on the other two systems.
Put XInclude "%FilePath%SearchGadget.pbi" at the top of your code and replace %FilePath% with the path to the files contained in the zip.
Usage
Return = SearchGadget(Gadget, x, y, Width, Height)
Return value
Returns nonzero on success and zero on failure. If #PB_Any was used as the #Gadget parameter then the return-value is the auto-generated gadget number on success.
Remarks
A 'mini help' can be added to this gadget using GadgetToolTip().
The following functions can be used to control the gadget:
- SetGadgetText(): Changes the text of the SearchGadget.
- GetGadgetText(): Returns the text of the SearchGadget.
- SetGadgetState(), GetGadgetState():
Possible values to set and get:
#SearchGadget_Mode_Delayed: This is the default setting. The Gadget sends the messages after a brief pause.
#SearchGadget_Mode_Immediate: With this setting the Gadget sends messages as soon as there are changes in the text field
#SearchGadget_Mode_Explicit: The Gadget sends messages only if the user clicks on the search icon or presses return/enter
Messages
The Gadget sends the message #PB_EventType_Input if there are changes in the text field (depending on the state value)
Download (with example)
Screenshot
