Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Down arrow in a container in a grid
Message
 
 
To
09/11/1998 12:14:55
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00155778
Message ID:
00155801
Views:
23
Patricia,

Put the code in the KeyPress() methods of the textbox class to delegate the record navigation to the container, like:
* keypress
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.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform