4D v13

PV SET STYLE NAME

Home

 
4D View v13
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_STRING(255;$StyleName`Name of style to rename in Area
 C_STRING(255;$NewName`New name to assign to the style in Area
 
 ARRAY LONGINT($StyleNumArray;0) `Style numbers array
 ARRAY STRING(255;$StyleNameArray;0) `Style names array
 
 C_INTEGER($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.

 
PROPERTIES 

Product: 4D
Theme: PV Style
Number: 15894

 
INDEX

Alphabetical list of commands

 
HISTORY 

Created: 4D View 6.8

 
SEE ALSO 

PV Add style