Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Valid in control in grid.
Message
De
11/08/1999 04:23:19
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
10/08/1999 16:30:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00252213
Message ID:
00252387
Vues:
10
>On my form I have a grid and a command button.
>In the grid there is a textbox.
>In the textbox's valid event I return .f. under certain circumstances to force valid entry. This works fine if the user attempts to move around within the grid; however, if the user clicks on the command button outside of the grid, the command button gets the focus even though the textbox's valid returns false (and even though the textbox's lostfocus never gets called).
>Is there anyway for control inside a grid to keep the focus regardless of where the user clicks?
Joel,
It's an MS confirmed bug. Workaround is to use grid.valid :
* Custom grid property lHangingValidation
* A valid.event of textbox
if ....
  this.parent.parent.lHangingValidation = .t.
else
  this.parent.parent.lHangingValidation = .f.
endif
return !this.parent.parent.lHangingValidation

* Grid.valid
if ....
   return .f.
else
   return !this.lHangingValidation
endif
If setting of lHangingValidation is done in InterActiveChange instead of valid of control then it's more stable.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform