Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keyboard or Activate cell problem
Message
De
20/07/2000 05:57:31
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Keyboard or Activate cell problem
Divers
Thread ID:
00394793
Message ID:
00394793
Vues:
39
This is the scenario:

Imagine a form with a NEW Record button and a grid, (and lots of other stuff, but lets keep it simple here).

When the New Record button is pressed the first empty cell in the first column should be activated.

I have tried the following approaches in the button click method:

THISFORM.Grid1.SETFOCUS
THISFORM.Grid1.ACTIVATECELL(1, 1)
i=2
DO WHILE NOT EMPTY(THISFORM.Grid1.Column1.Textbox1.VALUE)
> THISFORM.PAGES1.Page4._grid1.ACTIVATECELL(i,1)
> i=i+1
ENDDO

and this...

THISFORM.Grid1.SETFOCUS
THISFORM.Grid1.ACTIVATECELL(1, 1)
DO WHILE NOT EMPTY(THISFORM.Grid1.Column1.Textbox1.VALUE)
> KEYBOARD '{DNARROW}'
ENDDO

Unfortunately it seems that THISFORM.Grid1.Column1.Textbox1.VALUE always is evaluated to the value of the first row,col, and therefore the thing in fact becomes a forever loop.

What to do?

TIA and regards!
Peter Pirker


Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?

(Woody Allen)
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform