Included for backward compatibility. Use the TabIndex Property for controls instead.
This function is undocumented in the original VFP9 help file,
but the following documentation was found in the FoxPro for Windows 2.6 help, and may still be valid:
Returns the object number of an @ ... GET control.
OBJNUM(var [, expN]) |
Parameters
varvar is the name of the memory variable, array element or field specified when you create the control.
expN
Nested READs are created by issuing @ ... GETS and a READ in a routine called during a READ. READs can be nested to five levels. To return a control number for a control at a read level other than the current read level, include the optional read level number expN. If expN is omitted, OBJNUM() returns the @ ...GET control number for the current read level.
Return Value
Return value - Numeric
Remarks
You can use @ ... GET and @ ...EDIT to create controls, sometimes called objects. These controls are fields, check boxes, lists, popups; invisible, push, and radio buttons; spinners and text-editing regions. OBJNUM() returns a number that corresponds to a control's creation order in a set of controls.
Example
The following example creates a window and places radio buttons in the window so you can move the record pointer through an open table. If a table isn't open, the Open dialog is displayed so you can select a table to open.
SET TALK OFF
DEFINE WINDOW gotodialog FROM 9, 17 TO 19,61 ;
FLOAT NOCLOSE SHADOW DOUBLE COLOR SCHEME 5
PRIVATE file,lastobj,enter,tab,shifttab,up,down,left,right
*** Assign lastkey values ***
enter = 13
tab = 9
shifttab = 15
up = 5
down = 24
right = 4
left = 19
lastobj = 1
*** Open a table ***
IF EMPTY(DBF())
file = GETFILE('DBF','Pick a table')
IF EMPTY(FILE)
WAIT WINDOW 'Cancelled' NOWAIT
RETURN
ENDIF
USE (file)
ENDIF
*** Draw the fields ***
ACTIVATE WINDOW gotodialog
@ 0,1 TO 8,25
@ 1,3 GET radio PICTURE '@*RVN \ | |

Microsoft Visual FoxPro 9 SP2 Help file, VFPX Edition v1.08