Command WR GET STYLESHEET TAB

4D Write

WR GET STYLESHEET TAB

version 6.5


WR GET STYLESHEET TAB (area; stylesheetNum; tabNumber; position; justification; fillCharacter)

ParameterTypeDescription
areaLongint4D Write area
stylesheetNumLongintStylesheet number
tabNumberLongintTab number
positionNumberPosition of the tab
justificationIntegerAlignment value for the tab
fillCharacterStringSelected fill character

Description

The WR GET STYLESHEET TAB command allows you to retrieve the settings of the tab stop whose number was passed in tabNumber and which belongs to the style sheet whose number was passed in styleSheetNumber in the 4D Write area referenced by area.

To know the number of tabs in the style sheet, you can use: WR GET STYLESHEET INFO(area;styleSheetNumber;wr tab;applyTO), which will return the number of tab stops.

position is the distance from the left document margin to the tab stop, expressed in the current default units of the document.

alignment is the alignment type of the tab:

ValueText alignment
1 Left alignment
2Centered
3Right alignment
4Decimal
5Vertical separator

fillCharacter can be any character whose code is between 33 and 127. If fillCharacter is an empty string, then there is no fill character in the tab stop setting.

Example

You want to change the fill characters for each style sheet tab stop, and then update your document.

   $StyleSheetNum:=WR Count(Area;wr nb stylesheets)
   For ($i;1;$StyleSheetNum)
      $TabNum:=WR Get stylesheet text prop(Area;$i;wr tab;$Apply)
      If ($TabNum#0)
         For ($j;1;$TabNum)
            WR GET STYLESHEET TAB(Area;$i;$j;$Pos;$Justif;$FillChar)
            If ($FillChar#"")
               WR SET STYLESHEET TAB(Area;$i;$j;$Pos;$Justif;Char(126))
            End if 
         End for 
         WR UPDATE STYLESHEET(Area;$i)
      End if 
   End for 

See Also

WR ADD STYLESHEET TAB, WR GET TAB, WR SET STYLESHEET TAB.