The Mac and Linux versions of PB use the WebKit library for displaying contents in the WebGadget. I haven't found a WebKit function to display a 'find' dialog. The only dialogs I found were a file chooser and a print parameter dialog.
But the dialog shouldn't be the problem for you. I think the more important part is to search for a string in the HTML contents of the WebGadget and to highlight it. In MacOS this is realized by the Cocoa function searchFor:direction:caseSensitive:wrap: which seems to be a wrapper for the WebKit function webkit_web_view_search_text() which would be used in Linux.
For your conveniance I have put together a small MacOS code example which calls the procedure SearchString() to search for the string 'features' on
http://www.purebasic.com and to highlight its first occurrence. A second click onto the search button finds and highlights the second occurrence and so on.
Code: Select all
Procedure SearchString(WebGadgetID.I, String.S, Forward.I = #YES,
CaseSensitive.I = #NO, Wrap.I = #NO)
CocoaMessage(0, GadgetID(WebGadgetID),
"searchFor:$", @String,
"direction:", Forward,
"caseSensitive:", CaseSensitive,
"wrap:", Wrap)
EndProcedure
OpenWindow(0, 270, 200, 800, 640, "WebGadget")
WebGadget(0, 0, 0, 800, 600, "http://www.purebasic.com")
ButtonGadget(1, 330, 610, 150, 25, "Search 'features'")
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
Break
Case #PB_Event_Gadget
If EventGadget() = 1
SearchString(0, "features")
EndIf
EndSelect
ForEver
Update: I changed the arguments Forward, CaseSensitive and Wrap in the procedure SearchString() to optional ones and gave them a default value. In the procedure's CocoaMessage() I changed the constants against the variable names of the arguments. Thank you for pinpointing this error in your PM, Wilbert!