Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Scrolling
Message
From
30/10/1996 03:18:34
Regine Rosewich
Aurum Ges.F.Untern.Ber.U.Integration Mbh
Freiamt, Germany
 
 
To
29/10/1996 16:00:14
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00011067
Message ID:
00011129
Views:
35
>>>It's very unreliable to Save from LostFocus event. What's happened if user will use mouse to change cells? Normally we should use buffering and tableupdate(),tablerevert() functions and referential triggers.
>>
>>Edward: Thanks for kicking in on this. I didn't make myself very clear, I'm afraid: the LostFocus method kicks in a Save() method that I wrote that invokes TableUpdate, etc. It does not add a new record if a blank one already exists. All of that works great. The problem is the SetFocus() method--I can't get it to set focus on the empty Description cell that has been created if the grid must be scrolled to get to it.
>
>do u know if you have to scroll ?
>can't u SEEK the record you need and then (if needed) call ACTIVATECELL or so?
>
>Arnon

Hi John,

I almost had the same problem with a context-sensitive menu which enables the user to add records to a grid. The very simple solution was create a new method for the grid (e.g. GRIDADDNEW like in the TASTRADE Example) and work with RELATIVE ROW like in the following Snippet which should "fire" after the APPEND BLANK or INSERT command

WITH this
.SetFocus()
.Refresh()
.ActivateCell(.RelativeRow, 1)
ENDWITH

und tschüß....

Regine
********************************
VFP, VB, VC++ Programmers
Makers of the ==>TheMiL<== engine
for intra- and internet data processing
********************************
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform