Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Active Control object's ref. in grid
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 6 SP5
Miscellaneous
Thread ID:
01012835
Message ID:
01012982
Views:
23
This message has been marked as the solution to the initial question of the thread.
ON KEY LABEL F12 _SCREEN.ACTIVEFORM.OpenFlexiTableForm()

This is not a good idea. You would be better off to set the form's KeyPreviewProperty to .T. and write code in the form's KeyPress to handle this. The reason is that OKLs interrupt whatever code happens to be running at the time to do their thing. This may lead to some unexpected behavior.

I got the name of the text box okay, but when fired from the grid containing the text box I got only the grid's as name as the active control.
IF TYPE( '_Screen.Activeform.ActiveControl.Name' ) = 'C'
  loActiveControl = _Screen.Activeform.ActiveControl
  IF UPPER( loActiveControl.BaseClass ) = 'GRID'
    FOR EACH loColumn IN loActiveControl.Columns
      IF loActiveControl.ActiveColumn = loColumn.ColumnOrder
        loActiveControl = EVAL( 'loColumn.'+ loColumn.CurrentControl )
        EXIT
      ENDIF
    ENDFOR
  ENDIF      
ENDIF
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform