InputTabstop Method

[Top]  [Chapter]  [Previous]  [Next]

Applies to

IWPTextCursor

Declaration

procedure InputTabstop(ClearAllTabs: WordBool; Value: Integer; Kind: Integer; FillMode: Integer);

Description

 

This method creates a tab-stop and also inserts the tab character. It can optionally clear the existing tabstops. If you only want to define a tab-stop but do not need to insert the tab character use the method CurrPar.TabAdd.

 

Parameters

ClearAllTabs

True to clear tab list for current paragraph.

Value

Value of this tabstop (in twips=1/1440 inch)

Kind

The tabstop kind:

0 : Left tab

1 : Right tab

2 : Center tab

3 : Decimal tab

Fill

The fill mode used for this tabstop

0: No Filling

1: Dots ......

2: Dots in middle of line

3: Hyphens ------

4: Underline ______

5: Thick Hyphen ---------

6: Equal Signs =======

7: Arrow

 

This VB.NET example code inserts page numbering objects aligned at the right margin of the page. You can use it to add page numbers in a header or footer texts.

 

    Dim Memo As IWPEditor

     Memo = WpdllInt1.Memo

    Dim TextCursor As IWPTextCursor

     TextCursor = Memo.TextCursor

 

     TextCursor.InputText(" Page ")

     TextCursor.InputTabstop(False, _

         Memo.PageSize.PageWidth - Memo.PageSize.LeftMargin - Memo.PageSize.RightMargin, _

         1, 1)

     TextCursor.InputObject(TextObjTypes.wpobjTextObject, "PAGE", "", 0)

     TextCursor.InputText(" of ")

     TextCursor.InputObject(TextObjTypes.wpobjTextObject, "NUMPAGES", "", 0)


[idh_iwptextcursor_inputtabstop.htm]    Copyright © 2007 by WPCubed GmbH