Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stop auto erase when grid textbox accessed
Message
 
To
09/12/1997 23:02:25
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00064879
Message ID:
00064920
Views:
40
John,

Your problem is that the keystroke is still being processed after your code and that is overwriting the contents of the next textbox. You need to adjust your keypress code so that it clears the keystroke after the delete;

IF Whatever
DELETE
thisform.grid_whatever.column3.setfocus()
thisform.refresh()
NODEFAULT && eat the keystroke
ENDIF

Jimb


>I have it set up so that when a certain KeyPress occurs while the user is in any row of a grid this code is performed ...
>
> Delete
> thisform.grid_yell_card.Column3.setfocus
> thisform.refresh
>
>I have a filter on the grids table to not show deleted records.
>
>My problem is that everything works fine after the user chooses to delete the record ... the line they are on disappears like it should after it is marked for deletion in the code above, but when the cursor moves to any remaining line in the grid, the data in the column textbox it goes onto get erased and the cursor sits at the beginning of the now empty, textbox. I don't want it to erase the data contents of the textbox it moves into.
>
>I have tried turning SelectOnEntry on and off for the column's textbox properties, but this problem still continues. I even tried changing the above Setfocus line so the focus will go to a different columns textbox and the same erasure occurs. How can I keep a columns textbox contents from being erased when the Setfocus puts the cursor into it.
>
>John Fish
>JF Services
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform