4D View v16

PV SET STYLE NAME

Home

 
4D View v16
PV SET STYLE NAME

PV SET STYLE NAME 


 

PV SET STYLE NAME ( area ; stylesheet ; name ) 
Parameter Type   Description
area  Longint in 4D View area
stylesheet  Longint in Stylesheet ID
name  String in Stylesheet name

The PV SET STYLE NAME command renames the stylesheet with the character string passed in the name parameter.

Example  

This method allows you to rename a style.

 C_TEXT($StyleName//Name of style to rename in Area
 C_TEXT($NewName//New name to assign to the style in Area
 
 ARRAY LONGINT($StyleNumArray;0) //Style numbers array
 ARRAY TEXT($StyleNameArray;0) //Style names array
 
 C_LONGINT($Position//Position of the style to rename in the number and name arrays
 
 $StyleName:="subparagraph" //We want to rename the style "subparagraph"...
 $NewName:="Paragraph" //... to "Paragraph"
 
 PV GET STYLE LIST(Area;$StyleNumArray;$StyleNameArray//List of available styles
 
 $Position:=Find in array($StyleNameArray;$StyleName//Search for style to rename
 If($Position#-1) //Is the style to rename present in Area?
    PV SET STYLE NAME(Area;$StyleNumArray{$Position};$NewName//Rename it
 Else
    ALERT("The style '"+$StyleName+"' is not present in the area.")
 End if

If a style sheet with the same name already exists in the area, an error is returned by 4D View.



See also 

PV Add style

 
PROPERTIES 

Product: 4D View
Theme: PV Style
Number: 15894

 
HISTORY 

Created: 4D View 6.8

 
ARTICLE USAGE

4D View Language ( 4D View v16)