VpeSetControlTabIndex

<< Click to Display Table of Contents >>

Navigation:  Interactive Objects >

VpeSetControlTabIndex

Previous pageReturn to chapter overviewNext page

Sets the Tab-Index of the specified control. Each control has assigned a unique Tab-Index. The Tab-Index determines the order in which the user can Tab through the controls: if the user presses the Tab key on the keyboard, VPE will search the whole document for the control with the next higher Tab-Index and set the focus on it. The reverse is done, if the user presses Shift + Tab ("Backtab").

If you are using templates, the Tab-Index can be assigned to each object using dycodoc (in the object's properties dialog). If you are creating the controls by code (e.g. by calling VpeFormFieldControl(),VpeCheckbox(), etc.), VPE assigns automatically a Tab-Index to each object in the order of creation.

You can use this property to modify the Tab-Order of a document. But special care must be taken: make sure that you don't assign one and the same Tab-Index to more than one object. The Tab-Index must be unique for each object in the document.

void VpeSetControlTabIndex(

VpeHandle hControl,

long tab_index

)

VpeHandle hControl

Control Handle

long tab_index

the Tab-Index that is assigned to the specified control

Remarks:

The values 0 and -1 (0xffffffff) are reserved. You can not set the Tab-Index to either value, in such case the original Tab-Index remains unchanged.

 

The function allows that hControl may be NULL, in this case the function does nothing.

 

See Also:

"Interactive Documents" in the Programmer's Manual.