Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get ActiveRow,ActiveColumn,RelativeRow,RelativeColumn
Message
From
19/06/2003 06:12:37
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
19/06/2003 05:24:46
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00801629
Message ID:
00801653
Views:
14
Hi Fabio,
There is no solution without setfocus, since your properties are only available if the grid has focus. (ACTIVE* need to be active? ::) )
So you need to set focus to the grid, read your props and reset focus.
The biggest problem is to store and restore actual object. Since there are some traps I will give you an example.
LOCAL;
 loActiveControl

THISFORM.LOCKSCREEN = .T.
*Check if a Control is focused and if it could receive focus again
IF TYPE('THISFORM.ACTIVECONTROL')='O';
  AND !ISNULL(THISFORM.ACTIVECONTROL);
  AND PEMSTATUS(THISFORM.ACTIVECONTROL,'SETFOCUS',5) THEN
 loActiveControl = THISFORM.ACTIVECONTROL
ELSE &&TYPE('.ACTIVECONTROL' ...
 loActiveControl = NULL
ENDIF &&TYPE('.ACTIVECONTROL' ...

*YourGrid.SETFOCUS()
*Get your properties

*Re - Focus last Object
IF !ISNULL(loActiveControl) THEN
 loActiveControl.SETFOCUS()
ENDIF &&!ISNULL(loActiveControl)
THISFORM.LOCKSCREEN = .F.
HTH
Agnes
>Thanks Gregory.
>
>I need a solution without grid focus.
>
>Fabio
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform