I would like to be able to input a few different tables for an application. I want to be able to set the path before the app runs. How do I create a preference box and what code do I use to call the tables that I set in the box? I want it to resemble this:
You need to look at a couple of statements in the MapBasic reference guide.
- The Dialog statement lets you create a dialog.
- The Control EditText is used to let the user input values in a dialog
- The Control Button creates a button on the dialog that can call a handler/subprocedure where you for instance can ask the user to pick a file
- The Alter Control statement lets you alter an existing control on your dialog. Do remember to assign IDs to your control.
- The FileOpenDlg() function lets you show a dialog where the user can pick any type of file specified by you
- The Open File statement lets you open a file for input or output
- The Print # statement lets you write values to a file
- The Line Input lets you read values from a file
These are the statements and functions that you should have a look at.