Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to prevent Grid form losing focus ?????
Message
De
23/10/2005 12:06:41
 
 
À
23/10/2005 05:56:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01061471
Message ID:
01061485
Vues:
11
>With BeforeRowColchange I can prevent the Grid form changing rows when the data is not completed as I want.
>With the Valid event I can prevent the Grid from losing focus to other controles when the data in the row is not completed as I want. Other controles are not accesible then as I have tested and that works well.
>
>The problem I have is with the TreeView controle. When no other control can get the focus the TV can. Why is that ? Because it is an ole control ??
>

This is true partially.
grid.valid prevent the Grid from VFP losing focus also for an olecontrol
( olecontrol.Gotfocus doesn't fired )

What VFP doesn't do is to capture the queue of the messages that OS send to the ActiveX;
as a result all the inside events
*** ActiveX Control Event ***
of the olecontrol are fired however.

Unfortunately the treeview doesn't support a CancelEvent prop/param.

Then you have to control these events
* treeview.Gotfocus
this.tag ="gotfocus"
* treeview.lostfocus
this.tag =""

* treeview.Nodeclick
IF m.this.tag == ""
   * revert node selection
   RETURN
ENDIF
....
However you remembers,
in VFP it is not possible to stop the lostfocus among different forms,
even if the current form is Modal.

This is a very serious error,
but it seems that it don't interest anybody.

>Now I'm trying to do it with more code with the GotFocus event of the TV. But can someone tell me how this works or have to work ??
>
>Regards,
>Jan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform