Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Abstract reference to buffer field contents?
Message
From
21/12/1999 19:06:30
 
 
To
21/12/1999 19:02:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00306762
Message ID:
00307021
Views:
33
>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
>
I see.

The active control shows as a grid and you have to drill down to get the actual control. Are there any other containers that behave this way?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform