Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keyboard or Activate cell problem
Message
From
20/07/2000 05:57:31
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Keyboard or Activate cell problem
Miscellaneous
Thread ID:
00394793
Message ID:
00394793
Views:
40
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)
Next
Reply
Map
View

Click here to load this message in the networking platform