> Not sure what the problem is here.
The point is, that my method 'DoSearch' is called as expected when the user
hits Return or Enter, but then this keystroke is still in the 'pipeline'
when I display the resultset in a listbox. At that point usually the user
selects a record using the arrow keys and then hits enter to display the
record details. Now, here it goes directly to the details of the first
records (because the Returnkey is already in the pipeline).
I wondered if I could use a clearing method, maybe 'flushBufferedKeyEvents',
or something else to mark the return key as handled.
For now, in NSSearchFieldMBS' action event, I have created a hackish
workaround (with that bool imOSXSearchFieldReturnKeyPressed), which works
for me in most cases:
====
If Keyboard.AsyncKeyDown(&h4C) OR _ 'Enter
Keyboard.AsyncKeyDown(&h24) Then 'Return
WindowMain.imOSXSearchFieldReturnKeyPressed=True // Flag to track
the returnkey lateron
DoSearch
End If
====
Maybe another approach would be to set:
SearchField.sendsWholeSearchString=True
But this has another sideeffect: whenever I click on the clear icon of the
searchfield, then search criteria is cleared from the searchfield, but the
action event is triggered, which has the same effect as hitting the return
key (in that field).
Hitting the return key in an empty searchfield corresponds to a 'SELECT *
from datatable', i.e. all records will be displayed. So clicking the clear
button while .sendsWholeSearchString=True is not going to work for me.
Anyway, I will wait what I can do with the added eventhandlers that you
announced.
Meanwhile I just want to say, I hope you are not neglecting your growing
family - on sundays - even though I am naturaly happy to receive such a
quick answer!
All the best, Oliver
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info