Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Squirrelly grid behavior
Message
From
14/09/1998 16:16:10
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00135480
Message ID:
00136429
Views:
36
David,

I sure appreciate your taking the time to listen to my woes.

>The question was is the code in the TextBox within the grid or some other control?

The code is in the textbox. I looked again and still haven't found any KEYBOARD commands in the class or in the application object.

>But an event like Init() or GotFocus() could potentially be doing this without a timer. The key presses would be queued until the system started looking for keystrokes.

I checked again and the line of code in the program just above the event sequence is READ EVENTS.

Prior to the grid getting focus, there are several other textboxes on the form which the user (currently me) fills in. It would seem that the wait states from these controls would provide ample opportunity for the keystroke buffer to start clearing itself.

Here's the event sequence starting when the grid gets control:
grid.When()
grid.GotFocus()
grid.Message()
grid.text1.When()
grid.text1.GotFocus()
grid.text1.Message()
form.Paint()
grid.AfterRowColumnChange()
form.Paint()
grid.text1.Keypress(1,2)
grid.text1.Keypress(1,2)
grid.BeforeRowColumnChange()
grid.text1.RangeLow()
grid.text1.RangeHigh()
grid.text1.Valid()
grid.text1.LostFocus()
grid.text5.When()
grid.text5.GotFocus()
grid.text5.Message()
form.Paint()
grid.AfterRowColumnChange()
grid.text5.Keypress(1,2)
grid.text5.Keypress(1,2)
grid.BeforeRowColumnChange()
grid.text5.RangeLow()
grid.text5.RangeHigh()
grid.text5.Valid()
grid.text5.LostFocus()
grid.text4.When()
grid.text4.GotFocus()
grid.text4.Message()
form.Paint()
grid.AfterRowColumnChange()
grid.text4.Keypress(1,2)
grid.text4.Keypress(1,2)

.....and continuing back thru to text1 ad infinitum

>>If the controlsource for the object is readonly, then pressing a key while in the field will just cause a beep in the BaseClass default behavior. The NODEFAULT should stop that.

Putting NODEFAULT in the Keypress event stops the focus from cycling, but it also stops the grid from processing the keystrokes necessary to make it function. I need the arrow keys to move around the grid and the spacebar to make a selection.

Thanks again for the time and attention,

Pamela
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform