Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Abstract reference to buffer field contents?
Message
From
21/12/1999 19:02:26
 
 
To
21/12/1999 18:32:28
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00306762
Message ID:
00307019
Views:
32
Hi Dan,

>How do you get the ActiveControl from a grid?
LOCAL loActiveControl, lnColumn, loColumn

WITH This
     loActiveControl = IIF(TYPE([.oActiveForm.ActiveControl.Name]) = "C", .oActiveForm.ActiveControl, .NULL.)

     IF VARTYPE(loActiveControl) = "O" AND loActiveControl.BaseClass = [Grid]
        lnColumn = loActiveControl.ActiveColumn

        FOR EACH loColumn IN loActiveControl.Columns
            WITH loColumn
                 IF .ColumnOrder <> lnColumn
                    LOOP
                 ENDIF

                 RETURN IIF(NOT (.ReadOnly AND .Bound), EVAL( ([.] + .CurrentControl) ), loActiveControl)
            ENDWITH
        ENDFOR
     ELSE
        RETURN loActiveControl
     ENDIF
ENDWITH
- Jeff
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform