View Full Version : tabindex

2014-05-29, 17:29
In fox setting a tabindex of a form object to 0 excluded it from the tabbing sequence. In Lianja setting the tabindex to 0 has no affect on the tabbing.

How do I exclude a form object from the tab sequence. I want it present and selected by mouse but not tabbed to.



2014-05-29, 21:22
Hi Jim,

I don't see a way of doing that in our code as the underlying window system takes care of it.

2014-05-29, 23:46
are u saying i cant prevent an object from being tabbed to. what properties would stop it for instance will disabling stop an item from being tabbed to or is there a read only ??

2014-05-30, 00:43
Yes disabling it will remove it from the tab order.

2014-05-30, 00:44
There is also a readonly property in Lianja.

2014-05-30, 00:47
As well as the WHEN method if you are subclassing it.

2014-05-30, 00:52
Thanks Barry will play with it till i get the results i need.

2014-05-30, 04:27
Hi Jim,

I just tested that in VFP9 SP2, and setting a TabIndex to 0 didn'nt made any difference. Your described behaviour is also not documented. The official way in VFP9 to exclude a control from tabbing is to set the TABSTOP property to .F., which is also documented in the TabIndex help.

2014-05-30, 08:51
I would think you can just set the tab order to highest number for the object you want to skip. Then code the second to last object to setfocus back to the first object.
This was it stays readable, but doesnt get the focus unless you use the mouse.


2014-05-30, 20:39
thanks all for your comments.

hmmm 30 years 40 years ago when i developed this framework i am pretty sure that I read info that said setting tab index to 0 excluded it from tabbing. In any case it worked so I never complained :). And yes I can see a number of ways that I can control the action and achieve the results I want but it means code changes. I have run in vfp9 with out any issues btw so it does work but perhaps there is a combination of settings that complete the task.

Interesting! And points out how difficult the task of actually reaching 98% compatibility is. It is unreachable. It also points out how important it is for those of us in the trenches to keep the development group as aware as possible of our problems and needs.


2014-05-31, 00:09
As @woody pointed out, setting tabstop to .f. changes the behavior so the control does not gain focus when using Tab or Shift-Tab but only gains focus when it is clicked with the mouse. I have checked our code and this indeed is the way it is implemented.

2014-05-31, 01:10
Should that work in form sections? As I noted, tabstop is available for GET, but not for SET. Nor is the attribute surfaced on the attributes page.



2014-05-31, 21:39
No, he is referring to custom VFP code not Lianja Apps built using the App Builder.

2014-05-31, 21:49
In fact when you are "editing" a form section, the controls are visible and you can set any properties in the underlying control.

For example, "Edit" a form section then you can do this.

Lianja.getElementByID("page1.section1.field1).tabstop = .F.

Try it. It does prevent tabbing to the control using the Tab and Shift+Tab keys.

When property setters/getters are dispatched they affect the underlying UI control.

A form section has two modes of display. These are "Display" and "Edit". When in display mode the underlying control does not exist. When in "Edit" mode it does.