Re: go to next object

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I've admitted as much. Mea culpa.
-Anders

"Fred Taylor" <ftaylor@xxxxxxxx!REMOVE> wrote in message
news:%23Z3pp6kkHHA.4772@xxxxxxxxxxxxxxxxxxxxxxx
I agree with Dan on this one, Anders. If you were to return
this.TabIndex+1, you certainly won't end up where you think you should.

--
Fred
Microsoft Visual FoxPro MVP


"Anders Altberg" <anders.altberg> wrote in message
news:Op5L4LakHHA.4848@xxxxxxxxxxxxxxxxxxxxxxx
There's a solution that works in the Valid event:
RETURN This.Tabindex + 1
or, if you know which control you want to go to by name:
RETURN object.name

-Anders

"Fred Taylor" <ftaylor@xxxxxxxx!REMOVE> wrote in message
news:O2SB1OYkHHA.5084@xxxxxxxxxxxxxxxxxxxxxxx
TabIndex and position within controls have nothing to do with each
other. You can change the TabIndex, but the controls remain in the order
they were added to the form, unless you change their ZOrder.

--
Fred
Microsoft Visual FoxPro MVP


"Olaf Doschke" <b2xhZi5kb3NjaGtlQHNldG1pY3MuZGU@xxxxxxxxxxxxx> wrote in
message news:uJ9ZXlVkHHA.1624@xxxxxxxxxxxxxxxxxxxxxxx
IF This.Parent.Controlcount>This.TabIndex
This.Parent.Objects(This.Tabindex+1).Name
Endif
You mean, the Objects array of a form/container
is ordered in the tabindex order?

Okay, that makes it simple.

IF This.Parent.Controlcount=This.TabIndex
This.Parent.Objects(1).setfocus()
Else
This.Parent.Objects(This.TabIndex+1).setfocus()
Endif

Bye, Olaf.









.



Relevant Pages

  • Re: go to next object
    ... Microsoft Visual FoxPro MVP ... if you know which control you want to go to by name: ... is ordered in the tabindex order? ...
    (microsoft.public.fox.programmer.exchange)
  • Re: go to next object
    ... Microsoft Visual FoxPro MVP ... if you know which control you want to go to by name: ... is ordered in the tabindex order? ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Pageframe
    ... If you're running VFP8 or above in XP, you have to turn themes off if you ... Microsoft Visual FoxPro MVP ... > How do I control the color of the background of each page in a pageframe. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: go to next object
    ... Microsoft Visual FoxPro MVP ... if you know which control you want to go to by name: ... is ordered in the tabindex order? ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Change Color Schemes Programmatically?
    ... Microsoft Visual FoxPro MVP ... subclassed my control, so I guess I'll have to ... I know "color scheme" is old stuff - I think I used the wrong ...
    (microsoft.public.fox.programmer.exchange)