Hello,
I have a window where I can enter a search item. There is a default button "Search". After pressing this button I do a retrieve in a dw with the search item and display all the related rows in the dw.
Now, the user has two possibilities to open a new windows with details of this rowdata:
- by doubleclicking on the selected row (-every think went well!)
- by pressing the Enter-key
Here I have the problem:
In the dw there is a keypressed-event (from pbm_dwnkey) with the following code:
IF key=KEYENTER! THEN
this.TriggerEvent("Doubleclicked")
END IF
[In the Doubleclicked-event of the dw I open the new detail window]
If the user press the Enter-key, the new windows opens as it should be.
But after the opening of the windows, the default button "Search" is triggered - which means, that a new retrieve is triggered.
How can I "clean" the keyboardbuffer, or how can I prevent that the "ENTER!" is not used for triggering the default button.
Is there a sinole solution? Without using instant variables as flags?