Command WR DELETE TAB

4D Write

WR DELETE TAB

version 6.5


WR DELETE TAB (area; tabNum)

ParameterTypeDescription
areaLongint4D Write area
tabNumLongintTabulation number

Description

The WR DELETE TAB command deletes the tab whose number (counting left-to-right) is passed in tabNum from the 4D Write area referenced by area. If other tabs are located at the same position, they too will be deleted.

Note: If the selection consists of several paragraphs, the tab numbering applies to the last selected paragraph.

Example

You want to remove all the tab stops from your document:

   C_LONGINT(Area;$i;$TabNum;$uniform)
      `Inserting the cursor at the beginning of the area
   WR SET SELECTION(Area;0;0)
      `Counting the number of paragraphs in the document
   NbParag:=WR Count(Area;wr nb paragraphs)
      `Processing each paragraph
   For ($i;1;NbParag)
         `Getting the position of the paragraph
      WR GET PARAGRAPHS(Area;Start;Pos)
         `Going inside the paragraph
      WR SET SELECTION(Area;Start+1;Start+1)
         `Getting the number of tab stops
      $TabNum:=WR Get text property(Area;wr tab;$uniform)
      While ($TabNum#0)
         WR DELETE TAB(Area;1)
         $TabNum:=$TabNum-1
      End while 
         `Repositioning just after the last processed paragraph
      WR GET SELECTION(Area;Pos;Pos)
   End for  

See Also

WR ADD TAB, WR DELETE STYLESHEET TAB.