4D v13

WR UPDATE STYLESHEET

Home

 
4D Write v13
WR UPDATE STYLESHEET

WR UPDATE STYLESHEET 


 

WR UPDATE STYLESHEET ( area ; stylesheetNumber ) 
Parameter Type   Description
area  Longint in 4D Write area
stylesheetNumber  Longint in Stylesheet number

The WR UPDATE STYLESHEET command updates the displayed formatting of all the text using the style sheet referenced by styleSheetNumber in the 4D Write area referenced by area. After this command is executed, all text formatted with the referenced style will be formatted according to the current definition of that style.

Example  

You want to replace the tab stops in the "LayoutPar" style sheet and update text areas wherever that style sheet is applied:

  `Looking for the style sheet number
 $StyleSheetNb:=WR Count(Area;wr nb stylesheets)
 For($i;1;$StyleSheetNb)
    WR GET STYLESHEET INFO(Area;$i;$Name;$ApplyTo;$Prot;$Shortcut)
    If($Name="LayoutPar")
       SheetNumber:=$i
    End if
 End for
  `Getting the number of tab stops in the style sheet
 $NbTab:=WR Get stylesheet text prop(Area;SheetNumber;wr tab;Apply)
  `Deleting all tab stops
 For($i;1;$NbTab)
    WR DELETE STYLESHEET TAB(Area;SheetNumber;1)
 End for
  `Inserting new tabs
 WR ADD STYLESHEET TAB(Area;SheetNumber;10;wr left tab;Char(126))
 ...
  `Updating each paragraph that the style sheet is applied to
 WR UPDATE STYLESHEET(Area;SheetNumber)

 
PROPERTIES 

Product: 4D
Theme: WR Style Sheet
Number: 89454

 
INDEX

Alphabetical list of commands

 
HISTORY 

Created: 4D Write 6.5

 
SEE ALSO 

WR APPLY STYLESHEET