ITextPara::GetTab method (tom.h)

Retrieves tab parameters (displacement, alignment, and leader style) for a specified tab.

Syntax

HRESULT GetTab(
  long  iTab,
  float *ptbPos,
  long  *ptbAlign,
  long  *ptbLeader
);

Parameters

iTab

Type: long

Index of tab for which to retrieve info. It can be either a numerical index or a special value (see the following table). Since tab indexes are zero-based, iTab = zero gets the first tab defined, iTab = 1 gets the second tab defined, and so forth. The following table summarizes all of the possible values of iTab.

iTab Value Meaning
tomTabBack –3 Get tab previous to * ptbPos
tomTabNext –2 Get tab following * ptbPos
tomTabHere –1 Get tab at * ptbPos
>= 0 Get tab with index of iTab (and ignore ptbPos).

ptbPos

Type: float*

The tab displacement, in floating-point points. The value of * ptbPos is zero if the tab does not exist and the value of * ptbPos is tomUndefined if there are multiple values in the associated range.

ptbAlign

Type: long*

The tab alignment. For more information, see ITextPara::AddTab.

ptbLeader

Type: long*

The tab leader-character style. For more information, see ITextPara::AddTab.

Return value

Type: HRESULT

If ITextPara::GetTab succeeds, it returns S_OK. If the method fails, it returns one of the following COM error codes. For more information about COM error codes, see Error Handling in COM.

Return code Description
Value
Meaning
E_INVALIDARG
Invalid argument.
CO_E_RELEASED
The paragraph formatting object is attached to a range that has been deleted.
S_FALSE
There is no tab corresponding to iTab.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header tom.h
DLL Msftedit.dll

See also

AddTab

ClearAllTabs

Conceptual

DeleteTab

GetListTab

GetTabCount

ITextPara

Reference

SetListTab

Text Object Model