I have a grid, and would like to set it so that the arrow keys cause
the focus to move to the next/previous object in the tab order. In the
keypress method, I watch for chr(4), and keyboard a chr(9). This works
in the forward direction. However, I also watch for a chr(19), and
keyboard a '{SHIFT+TAB}', but nothing happens. I can press shift-tab,
and it works as expected, but programatically doing it seems to be
ignored. I can't keyboard a chr(15), because this is also ctrl-o and
causes the open dialog to appear. Up/down arrows works as expected.

So - how can I trap a left arrow, and keyboard a shift-tab so that the
focus moves to the previous object in the tab order?

Here is a sample form that I've been working with, and it has the grid
with the specific settings we need:

http://zootal.no-ip.info/stuff/VFP%20Stuff/

You want the form files for gridnavtest. Click on the grid, and then
when the grid has the focus, try the left and right arrow keys. You
can look at the simple code to see what I'm doing.

Background: I'm using the grid in a calendar control, where each grid
is a day of the month. I'd like to use the arrow keys to navigate from
one date to the next, but so far have only got it to work in the
forward direction. I can use code and manually setfocus to the desired
control, but it would be cleaner if I could just stuff a shift-tab
into the keyboard buffer.

Re: How to convert arrow keys to tab/shift-tab in a grid by Dan

Dan
Tue Jun 19 15:41:31 CDT 2007

For shift-tab, the key label is BACKTAB. See the On Key Label help topic for
the full list.

Dan

Ook wrote:
> I have a grid, and would like to set it so that the arrow keys cause
> the focus to move to the next/previous object in the tab order. In the
> keypress method, I watch for chr(4), and keyboard a chr(9). This works
> in the forward direction. However, I also watch for a chr(19), and
> keyboard a '{SHIFT+TAB}', but nothing happens. I can press shift-tab,
> and it works as expected, but programatically doing it seems to be
> ignored. I can't keyboard a chr(15), because this is also ctrl-o and
> causes the open dialog to appear. Up/down arrows works as expected.
>
> So - how can I trap a left arrow, and keyboard a shift-tab so that the
> focus moves to the previous object in the tab order?
>
> Here is a sample form that I've been working with, and it has the grid
> with the specific settings we need:
>
> http://zootal.no-ip.info/stuff/VFP%20Stuff/
>
> You want the form files for gridnavtest. Click on the grid, and then
> when the grid has the focus, try the left and right arrow keys. You
> can look at the simple code to see what I'm doing.
>
> Background: I'm using the grid in a calendar control, where each grid
> is a day of the month. I'd like to use the arrow keys to navigate from
> one date to the next, but so far have only got it to work in the
> forward direction. I can use code and manually setfocus to the desired
> control, but it would be cleaner if I could just stuff a shift-tab
> into the keyboard buffer.



Re: How to convert arrow keys to tab/shift-tab in a grid by Ook

Ook
Tue Jun 19 16:14:16 CDT 2007

On Jun 19, 1:41 pm, "Dan Freeman" <s...@microsoft.com> wrote:
> For shift-tab, the key label is BACKTAB. See the On Key Label help topic for
> the full list.
>
> Dan
>
> Ook wrote:
> > I have a grid, and would like to set it so that the arrow keys cause
> > the focus to move to the next/previous object in the tab order. In the
> > keypress method, I watch for chr(4), and keyboard a chr(9). This works
> > in the forward direction. However, I also watch for a chr(19), and
> > keyboard a '{SHIFT+TAB}', but nothing happens. I can press shift-tab,
> > and it works as expected, but programatically doing it seems to be
> > ignored. I can't keyboard a chr(15), because this is also ctrl-o and
> > causes the open dialog to appear. Up/down arrows works as expected.
>
> > So - how can I trap a left arrow, and keyboard a shift-tab so that the
> > focus moves to the previous object in the tab order?
>
> > Here is a sample form that I've been working with, and it has the grid
> > with the specific settings we need:
>
> >http://zootal.no-ip.info/stuff/VFP%20Stuff/
>
> > You want the form files for gridnavtest. Click on the grid, and then
> > when the grid has the focus, try the left and right arrow keys. You
> > can look at the simple code to see what I'm doing.
>
> > Background: I'm using the grid in a calendar control, where each grid
> > is a day of the month. I'd like to use the arrow keys to navigate from
> > one date to the next, but so far have only got it to work in the
> > forward direction. I can use code and manually setfocus to the desired
> > control, but it would be cleaner if I could just stuff a shift-tab
> > into the keyboard buffer.

LOL, and it's the third in the Intellisense list, too. That was too
easy. Thank you thank you thank you :)


Re: How to convert arrow keys to tab/shift-tab in a grid by Dan

Dan
Tue Jun 19 17:46:10 CDT 2007

Ook wrote:
> On Jun 19, 1:41 pm, "Dan Freeman" <s...@microsoft.com> wrote:
>> For shift-tab, the key label is BACKTAB. See the On Key Label help
>> topic for the full list.
>>
>> Dan
>>
>
> LOL, and it's the third in the Intellisense list, too. That was too
> easy. Thank you thank you thank you :)

You're welcome! If I only had a nickel....... <g>

Dan



Re: How to convert arrow keys to tab/shift-tab in a grid by Ook

Ook
Wed Jun 20 11:22:04 CDT 2007

On Jun 19, 3:46 pm, "Dan Freeman" <s...@microsoft.com> wrote:
> Ook wrote:
> > On Jun 19, 1:41 pm, "Dan Freeman" <s...@microsoft.com> wrote:
> >> For shift-tab, the key label is BACKTAB. See the On Key Label help
> >> topic for the full list.
>
> >> Dan
>
> > LOL, and it's the third in the Intellisense list, too. That was too
> > easy. Thank you thank you thank you :)
>
> You're welcome! If I only had a nickel....... <g>
>
> Dan

Heh - I wish I had a nickel for everytime I get stumped by something
so simple. The complex stuff is easy, but simple things? It's like
math class. Indefinite integrals? Easy. Simple math? Trips me up
everytime.