Patricia,
Put the code in the KeyPress() methods of the textbox class to delegate the record navigation to the container, like:
lparameters ...
do case
case ( nKeyCode = down_arrow )
this.parent.Navigate( +1 )
nodefault
case ( nKeyCode = up_arrow )
this.parent.Navigate( -1 )
nodefault
endif
>We've built a custom class (call it ftContainer), which consists of a container with several textBoxes inside it. Then we put an instance of ftContainer into a grid. At runtime when one of the textBoxes in ftContainer has the focus, if I press the down arrow, VFP moves the focus to the next textBox inside ftContainer instead of down to the next row of the grid.
>
>We tried using the form's KeyPress to intercept the down arrow, but when we do that and SKIP (to go to the next record), and changes we made in the textBox are lost. Other attempts have resulted in major performance slowdowns.
>
>Can anybody suggest a way to make the down arrow navigate to the next row of the grid, while preserving any edits to the existing record? In other words, we want to make VFP treat the down arrow the same as it would in a simple control in the grid.