Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get ActiveRow,ActiveColumn,RelativeRow,RelativeColumn
Message
De
19/06/2003 06:12:37
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
19/06/2003 05:24:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00801629
Message ID:
00801653
Vues:
15
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]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform