I am in the process of converting and A4 app to A5V7. I have discovered xdialog gives me a versatility and speedier way of doing a lot of the smaller things in day to day usage of the app. I want to be able to use xdialog as much as possible.
I have attached a zip file containing an abbreviated copy of a table called insured.dbf and a text document that contains a script designed to get the insured id number for a specific record.
The script was created by using the script genie then converting it to xbasic which has the xdialog portions in it also.
At the end of the script, I have a little tester that tells me if I select a row in the list and click ok, it will give me the insured id variable I am looking for.
Here is the problem:
a) If I double click to select a record, it gets the correct InsuredID and sets it to a variable but, it does not close the xdialog. The selection and variable setting is done in a function declared before the xdialog box initializes.
b) If I single click on the row in the list box and then press enter, I think I get the correct setting of the variable but again the xdialog box does not close.
c) If I use the up or down arrows to select a record and then press enter like a keyboard data entry person, guess what? The xdialog box doesn't close.
The only thing that works correctly every time is if I click on the ok button regardless of how the record was selected.
Since this particular script will be used in many different situations, I need to be able to allow the user whichever way they do things to select the appropriate record. That means double clicking, single clicking and then clicking ok button (which works), using the up and down arrows to select the correct record and then pressing the enter key for those that don't like using mice during data entry.
What I am asking is how to code so that the enter key will always be trapped for those using the keyboard and where the coding should be on the script and
Secondly, how do I code so that double clicking will close the xdialog box and give me the variable I need? Also, where would I put that code?
TIA
I have attached a zip file containing an abbreviated copy of a table called insured.dbf and a text document that contains a script designed to get the insured id number for a specific record.
The script was created by using the script genie then converting it to xbasic which has the xdialog portions in it also.
At the end of the script, I have a little tester that tells me if I select a row in the list and click ok, it will give me the insured id variable I am looking for.
Here is the problem:
a) If I double click to select a record, it gets the correct InsuredID and sets it to a variable but, it does not close the xdialog. The selection and variable setting is done in a function declared before the xdialog box initializes.
b) If I single click on the row in the list box and then press enter, I think I get the correct setting of the variable but again the xdialog box does not close.
c) If I use the up or down arrows to select a record and then press enter like a keyboard data entry person, guess what? The xdialog box doesn't close.
The only thing that works correctly every time is if I click on the ok button regardless of how the record was selected.
Since this particular script will be used in many different situations, I need to be able to allow the user whichever way they do things to select the appropriate record. That means double clicking, single clicking and then clicking ok button (which works), using the up and down arrows to select the correct record and then pressing the enter key for those that don't like using mice during data entry.
What I am asking is how to code so that the enter key will always be trapped for those using the keyboard and where the coding should be on the script and
Secondly, how do I code so that double clicking will close the xdialog box and give me the variable I need? Also, where would I put that code?
TIA
Comment