Ok,
Example: We have a number of payroll reports that could be printed out by employee. We want the user to be able to get an up to date list of employees.
Originally we setup a table in the users PRIV dir that used the default table lookup to the employee master file. The problem with that is that the default PDox table lookup has no edit capablility. Didn't look very good either. And in the case of multiple companies, we had to setup multiple PRIV directories and specify where they were with a -p on the icon.
So instead we setup a form with a table frame object on it. That way it looked like the rest of our program. Then on the report form, for the first employee field we added the following code to the action method:
DODEFAULT
IF
EVENTINFO.ID() = DATALOOKUP
THEN
SETMOUSESHAPE(MOUSEWAIT)
MESSAGE("Please wait..."

DISABLEDEFAULT
F.OPEN("PREMPPOP"

SETMOUSESHAPE(MOUSEARROW)
MESSAGE(""

F.WAIT()
ACTIVE.ACTION(FIELDFORWARD)
ENDIF
This traps for the Ctrl+Spacebar, disables the default behavior, then calls the lookup form, and waits for the user to select. Once the selections have been made, the user is moved on to the next selection criteria automatically.
On the lookup form I have three undefined fields, SELECTOR; SFIRST;SLAST. In the Keyphysical method on the form level I trap for wether the F5 key is pressed and whether the selector field is Y or N. I then switch the selector to the other logical value and if the selector is being turned on, I set the SFIRST and SLAST to the employee number value.
On the Arrive method of the record object I run the following code:
DODEFAULT
IF
SELECTOR="Y"
THEN
SWITCH
CASE SFIRST=MAINKEY :
SLAST = MAINKEY
SELECT1()
CASE SFIRST<MAINKEY AND SLAST<MAINKEY:
SLAST = MAINKEY
SELECT1()
CASE SFIRST<MAINKEY AND SLAST>MAINKEY:
SLAST = MAINKEY
SELECT1()
CASE SFIRST>MAINKEY :
SLAST = MAINKEY
SELECT1()
ENDSWITCH
ELSE
ENDIF
The methods SELECT1() and SELECT2() sets my field colors and font color from our default scheme to a black and white inverse scheme.
Finally on the newvalue of the employee number field I put the following code:
DODEFAULT
IF
SELF>=SFIRST AND SELF<=SLAST
THEN
SELECT1()
ELSE
SELECT2()
ENDIF
This sets the color for each record even if the user pages up or down on the MRO.
There is more code that sends the value in the SFIRST and SLAST to the calling form upon the users either pressing return on the employee number or pressing a "SELECT" button on the form.
We also have the ability to password protect what actions the user can or cannot do while on the form. IE: you can lookup but NOT modify, you can modify but NOT add, you can add but NOT delete. Or you can only look at a certain class of employee.
All in all we are fairly happy with the GUI.
BTW; we are neighbors, our offices are in Brookshire Texas, just west of Katy.