| 4D Write v15WR UPDATE STYLESHEET | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 
 | 
    4D Write v15
 WR UPDATE STYLESHEET 
         | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| WR UPDATE STYLESHEET ( area ; stylesheetNumber ) | ||||||||
| Parameter | Type | Description | ||||||
| area | Longint |   | 4D Write area | |||||
| stylesheetNumber | Longint |   | 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.
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)
	Product:  4D Write
	Theme:  WR Style Sheet
	Number:  
        89454
        
        
        
	
	Created:  4D Write 6.5
	
	
	
	
	
	
	
	
	4D Write Language ( 4D Write v15)
	
	
	
	
	
	
	
 Add a comment
Add a comment